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

Side by Side Diff: chrome/browser/chromeos/user_cros_settings_provider.cc

Issue 7618021: base: Fix the TODO in ListValue::Remove(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 5 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 prefs->ScheduleSavePersistentPrefs(); 654 prefs->ScheduleSavePersistentPrefs();
655 } 655 }
656 656
657 void UserCrosSettingsProvider::UnwhitelistUser(const std::string& email) { 657 void UserCrosSettingsProvider::UnwhitelistUser(const std::string& email) {
658 SignedSettingsHelper::Get()->StartWhitelistOp( 658 SignedSettingsHelper::Get()->StartWhitelistOp(
659 email, false, UserCrosSettingsTrust::GetInstance()); 659 email, false, UserCrosSettingsTrust::GetInstance());
660 660
661 PrefService* prefs = g_browser_process->local_state(); 661 PrefService* prefs = g_browser_process->local_state();
662 ListPrefUpdate cached_whitelist_update(prefs, kAccountsPrefUsers); 662 ListPrefUpdate cached_whitelist_update(prefs, kAccountsPrefUsers);
663 StringValue email_value(email); 663 StringValue email_value(email);
664 if (cached_whitelist_update->Remove(email_value) != -1) 664 if (cached_whitelist_update->Remove(email_value, NULL))
665 prefs->ScheduleSavePersistentPrefs(); 665 prefs->ScheduleSavePersistentPrefs();
666 } 666 }
667 667
668 // static 668 // static
669 void UserCrosSettingsProvider::UpdateCachedOwner(const std::string& email) { 669 void UserCrosSettingsProvider::UpdateCachedOwner(const std::string& email) {
670 UpdateCacheString(kDeviceOwner, email, USE_VALUE_SUPPLIED); 670 UpdateCacheString(kDeviceOwner, email, USE_VALUE_SUPPLIED);
671 } 671 }
672 672
673 } // namespace chromeos 673 } // namespace chromeos
OLDNEW
« no previous file with comments | « base/values_unittest.cc ('k') | chrome/browser/content_settings/content_settings_notification_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698