Home | History | Annotate | Download | only in common
      1 # Copyright 2013 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 DEFAULT = 'default'
      6 UNIMPORTANT = 'unimportant'
      7 HISTOGRAM = 'histogram'
      8 UNIMPORTANT_HISTOGRAM = 'unimportant-histogram'
      9 INFORMATIONAL = 'informational'
     10 
     11 ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM,
     12              INFORMATIONAL]
     13 
     14 
     15 def IsValidType(datatype):
     16   return datatype in ALL_TYPES
     17 
     18 
     19 def IsHistogram(datatype):
     20   return (datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM)
     21