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 5DEFAULT = 'default' 6UNIMPORTANT = 'unimportant' 7HISTOGRAM = 'histogram' 8UNIMPORTANT_HISTOGRAM = 'unimportant-histogram' 9INFORMATIONAL = 'informational' 10 11ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM, 12 INFORMATIONAL] 13 14 15def IsValidType(datatype): 16 return datatype in ALL_TYPES 17 18 19def IsHistogram(datatype): 20 return datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM 21