diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 23:38:18 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 23:38:18 +0000 |
commit | 411bb5003b9955316d350cd20f28bf8ef47e3da1 (patch) | |
tree | 25538c6b790cb8852b0a377f0a1b8c320c48f756 /chrome/browser/sync/syncable | |
parent | 09ad77a8faf8896f0214e9c33958ad40f517c913 (diff) | |
download | chromium_src-411bb5003b9955316d350cd20f28bf8ef47e3da1.zip chromium_src-411bb5003b9955316d350cd20f28bf8ef47e3da1.tar.gz chromium_src-411bb5003b9955316d350cd20f28bf8ef47e3da1.tar.bz2 |
Let NotificationTypeToRealModelType() handle APP_SETTINGS correctly.
Change the function so that the compiler can catch problems like this
in the future.
BUG=none
TEST=none
TBR=akalin
Review URL: http://codereview.chromium.org/8753003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/syncable')
-rw-r--r-- | chrome/browser/sync/syncable/model_type.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc index 42cfc39..f1accf5 100644 --- a/chrome/browser/sync/syncable/model_type.cc +++ b/chrome/browser/sync/syncable/model_type.cc @@ -650,15 +650,17 @@ bool NotificationTypeToRealModelType(const std::string& notification_type, return true; } else if (notification_type == kAppSettingNotificationType) { *model_type = APP_SETTINGS; + return true; } else if (notification_type == kExtensionSettingNotificationType) { *model_type = EXTENSION_SETTINGS; return true; } else if (notification_type == kAppNotificationNotificationType) { *model_type = APP_NOTIFICATIONS; return true; + } else { + *model_type = UNSPECIFIED; + return false; } - *model_type = UNSPECIFIED; - return false; } ModelTypeSet GetAllRealModelTypes() { |