diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-13 17:34:31 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-13 17:34:31 +0000 |
commit | 4fc3c56432cde7d5c938cb75bdfbabd75d9ec755 (patch) | |
tree | c75bebaa6ad73888b12e93a24c1880ece01dde96 /chrome/browser/content_settings | |
parent | 9978b8f0cbac1cd176a6ecac457eb9dacd3ad0f0 (diff) | |
download | chromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.zip chromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.tar.gz chromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.tar.bz2 |
base: Fix the TODO in ListValue::Remove().
Change the return type of Remove() to bool, and add a size_t output parameter.
BUG=None
TEST=None
R=evan@chromium.org
Review URL: http://codereview.chromium.org/7618021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings')
-rw-r--r-- | chrome/browser/content_settings/content_settings_notification_provider.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/content_settings/content_settings_notification_provider.cc b/chrome/browser/content_settings/content_settings_notification_provider.cc index 17c1403..98893be 100644 --- a/chrome/browser/content_settings/content_settings_notification_provider.cc +++ b/chrome/browser/content_settings/content_settings_notification_provider.cc @@ -281,7 +281,7 @@ void NotificationProvider::PersistPermissionChange( // Remove from one list and add to the other. if (is_allowed) { // Remove from the denied list. - if (denied_sites->Remove(*value) != -1) + if (denied_sites->Remove(*value, NULL)) denied_changed = true; // Add to the allowed list. @@ -289,7 +289,7 @@ void NotificationProvider::PersistPermissionChange( allowed_changed = true; } else { // Remove from the allowed list. - if (allowed_sites->Remove(*value) != -1) + if (allowed_sites->Remove(*value, NULL)) allowed_changed = true; // Add to the denied list. @@ -336,8 +336,8 @@ void NotificationProvider::ResetAllowedOrigin(const GURL& origin) { ListPrefUpdate update(prefs, prefs::kDesktopNotificationAllowedOrigins); ListValue* allowed_sites = update.Get(); StringValue value(origin.spec()); - int removed_index = allowed_sites->Remove(value); - DCHECK_NE(-1, removed_index) << origin << " was not allowed"; + bool removed = allowed_sites->Remove(value, NULL); + DCHECK_NE(false, removed) << origin << " was not allowed"; } prefs->ScheduleSavePersistentPrefs(); } @@ -353,8 +353,8 @@ void NotificationProvider::ResetBlockedOrigin(const GURL& origin) { ListPrefUpdate update(prefs, prefs::kDesktopNotificationDeniedOrigins); ListValue* denied_sites = update.Get(); StringValue value(origin.spec()); - int removed_index = denied_sites->Remove(value); - DCHECK_NE(-1, removed_index) << origin << " was not blocked"; + bool removed = denied_sites->Remove(value, NULL); + DCHECK_NE(false, removed) << origin << " was not blocked"; } prefs->ScheduleSavePersistentPrefs(); } |