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

Unified Diff: chrome/browser/sync/syncable/model_type.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/syncable/model_type.h ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.cc
===================================================================
--- chrome/browser/sync/syncable/model_type.cc (revision 91968)
+++ chrome/browser/sync/syncable/model_type.cc (working copy)
@@ -440,58 +440,58 @@
// TODO(akalin): Figure out a better way to do these mappings.
namespace {
-const char kBookmarkNotificationType[] = "BOOKMARK";
-const char kPreferenceNotificationType[] = "PREFERENCE";
-const char kPasswordNotificationType[] = "PASSWORD";
-const char kAutofillNotificationType[] = "AUTOFILL";
-const char kThemeNotificationType[] = "THEME";
-const char kTypedUrlNotificationType[] = "TYPED_URL";
-const char kExtensionNotificationType[] = "EXTENSION";
-const char kNigoriNotificationType[] = "NIGORI";
-const char kAppNotificationType[] = "APP";
-const char kSearchEngineNotificationType[] = "SEARCH_ENGINE";
-const char kSessionNotificationType[] = "SESSION";
-const char kAutofillProfileNotificationType[] = "AUTOFILL_PROFILE";
+const char kBookmarkint[] = "BOOKMARK";
+const char kPreferenceint[] = "PREFERENCE";
+const char kPasswordint[] = "PASSWORD";
+const char kAutofillint[] = "AUTOFILL";
+const char kThemeint[] = "THEME";
+const char kTypedUrlint[] = "TYPED_URL";
+const char kExtensionint[] = "EXTENSION";
+const char kNigoriint[] = "NIGORI";
+const char kAppint[] = "APP";
+const char kSearchEngineint[] = "SEARCH_ENGINE";
+const char kSessionint[] = "SESSION";
+const char kAutofillProfileint[] = "AUTOFILL_PROFILE";
} // namespace
-bool RealModelTypeToNotificationType(ModelType model_type,
+bool RealModelTypeToint(ModelType model_type,
std::string* notification_type) {
switch (model_type) {
case BOOKMARKS:
- *notification_type = kBookmarkNotificationType;
+ *notification_type = kBookmarkint;
return true;
case PREFERENCES:
- *notification_type = kPreferenceNotificationType;
+ *notification_type = kPreferenceint;
return true;
case PASSWORDS:
- *notification_type = kPasswordNotificationType;
+ *notification_type = kPasswordint;
return true;
case AUTOFILL:
- *notification_type = kAutofillNotificationType;
+ *notification_type = kAutofillint;
return true;
case THEMES:
- *notification_type = kThemeNotificationType;
+ *notification_type = kThemeint;
return true;
case TYPED_URLS:
- *notification_type = kTypedUrlNotificationType;
+ *notification_type = kTypedUrlint;
return true;
case EXTENSIONS:
- *notification_type = kExtensionNotificationType;
+ *notification_type = kExtensionint;
return true;
case NIGORI:
- *notification_type = kNigoriNotificationType;
+ *notification_type = kNigoriint;
return true;
case APPS:
- *notification_type = kAppNotificationType;
+ *notification_type = kAppint;
return true;
case SEARCH_ENGINES:
- *notification_type = kSearchEngineNotificationType;
+ *notification_type = kSearchEngineint;
return true;
case SESSIONS:
- *notification_type = kSessionNotificationType;
+ *notification_type = kSessionint;
return true;
case AUTOFILL_PROFILE:
- *notification_type = kAutofillProfileNotificationType;
+ *notification_type = kAutofillProfileint;
return true;
default:
break;
@@ -500,42 +500,42 @@
return false;
}
-bool NotificationTypeToRealModelType(const std::string& notification_type,
+bool intToRealModelType(const std::string& notification_type,
ModelType* model_type) {
- if (notification_type == kBookmarkNotificationType) {
+ if (notification_type == kBookmarkint) {
*model_type = BOOKMARKS;
return true;
- } else if (notification_type == kPreferenceNotificationType) {
+ } else if (notification_type == kPreferenceint) {
*model_type = PREFERENCES;
return true;
- } else if (notification_type == kPasswordNotificationType) {
+ } else if (notification_type == kPasswordint) {
*model_type = PASSWORDS;
return true;
- } else if (notification_type == kAutofillNotificationType) {
+ } else if (notification_type == kAutofillint) {
*model_type = AUTOFILL;
return true;
- } else if (notification_type == kThemeNotificationType) {
+ } else if (notification_type == kThemeint) {
*model_type = THEMES;
return true;
- } else if (notification_type == kTypedUrlNotificationType) {
+ } else if (notification_type == kTypedUrlint) {
*model_type = TYPED_URLS;
return true;
- } else if (notification_type == kExtensionNotificationType) {
+ } else if (notification_type == kExtensionint) {
*model_type = EXTENSIONS;
return true;
- } else if (notification_type == kNigoriNotificationType) {
+ } else if (notification_type == kNigoriint) {
*model_type = NIGORI;
return true;
- } else if (notification_type == kAppNotificationType) {
+ } else if (notification_type == kAppint) {
*model_type = APPS;
return true;
- } else if (notification_type == kSearchEngineNotificationType) {
+ } else if (notification_type == kSearchEngineint) {
*model_type = SEARCH_ENGINES;
return true;
- } else if (notification_type == kSessionNotificationType) {
+ } else if (notification_type == kSessionint) {
*model_type = SESSIONS;
return true;
- } else if (notification_type == kAutofillProfileNotificationType) {
+ } else if (notification_type == kAutofillProfileint) {
*model_type = AUTOFILL_PROFILE;
return true;
}
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698