| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |