Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2540)

Unified Diff: sync/internal_api/public/base/model_type.h

Issue 12820010: sync: Define histogram ints for model types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove comment Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/glue/ui_data_type_controller.cc ('k') | sync/syncable/model_type.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/base/model_type.h
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h
index a44ad198cfad440c9f05d4eed2d18c41883f9589..ebf76653f2241a471d676df8f362387fdb74b810 100644
--- a/sync/internal_api/public/base/model_type.h
+++ b/sync/internal_api/public/base/model_type.h
@@ -49,11 +49,6 @@ enum ModelType {
// can be represented in the protocol using a specific Message type in the
// EntitySpecifics protocol buffer.
//
- // WARNING: Modifying the order of these types or inserting a new type above
- // these will affect numerous histograms that rely on the enum values being
- // consistent. When adding a new type, add it to the end of the user model
- // types section, but before the proxy types.
- //
// A bookmark folder or a bookmark URL object.
BOOKMARKS,
FIRST_USER_MODEL_TYPE = BOOKMARKS, // Declared 2nd, for debugger prettiness.
@@ -244,6 +239,11 @@ FullModelTypeSet ToFullModelTypeSet(ModelTypeSet in);
// the name of |model_type|.
SYNC_EXPORT const char* ModelTypeToString(ModelType model_type);
+// Some histograms take an integer parameter that represents a model type.
+// The mapping from ModelType to integer is defined here. It should match
+// the mapping from integer to labels defined in histograms.xml.
+SYNC_EXPORT int ModelTypeToHistogramInt(ModelType model_type);
+
// Handles all model types, and not just real ones.
//
// Caller takes ownership of returned value.
« no previous file with comments | « chrome/browser/sync/glue/ui_data_type_controller.cc ('k') | sync/syncable/model_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698