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

Side by Side Diff: chrome/browser/chromeos/login/multi_profile_user_controller.cc

Issue 106433007: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/login/multi_profile_user_controller.h" 5 #include "chrome/browser/chromeos/login/multi_profile_user_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void MultiProfileUserController::RemoveCachedValues( 138 void MultiProfileUserController::RemoveCachedValues(
139 const std::string& user_email) { 139 const std::string& user_email) {
140 DictionaryPrefUpdate update(local_state_, 140 DictionaryPrefUpdate update(local_state_,
141 prefs::kCachedMultiProfileUserBehavior); 141 prefs::kCachedMultiProfileUserBehavior);
142 update->RemoveWithoutPathExpansion(user_email, NULL); 142 update->RemoveWithoutPathExpansion(user_email, NULL);
143 policy::PolicyCertServiceFactory::ClearUsedPolicyCertificates(user_email); 143 policy::PolicyCertServiceFactory::ClearUsedPolicyCertificates(user_email);
144 } 144 }
145 145
146 std::string MultiProfileUserController::GetCachedValue( 146 std::string MultiProfileUserController::GetCachedValue(
147 const std::string& user_email) const { 147 const std::string& user_email) const {
148 const DictionaryValue* dict = 148 const base::DictionaryValue* dict =
149 local_state_->GetDictionary(prefs::kCachedMultiProfileUserBehavior); 149 local_state_->GetDictionary(prefs::kCachedMultiProfileUserBehavior);
150 std::string value; 150 std::string value;
151 if (dict && dict->GetStringWithoutPathExpansion(user_email, &value)) 151 if (dict && dict->GetStringWithoutPathExpansion(user_email, &value))
152 return SanitizeBehaviorValue(value); 152 return SanitizeBehaviorValue(value);
153 153
154 return std::string(kBehaviorUnrestricted); 154 return std::string(kBehaviorUnrestricted);
155 } 155 }
156 156
157 void MultiProfileUserController::SetCachedValue( 157 void MultiProfileUserController::SetCachedValue(
158 const std::string& user_email, 158 const std::string& user_email,
(...skipping 22 matching lines...) Expand all
181 181
182 PrefService* prefs = user_profile->GetPrefs(); 182 PrefService* prefs = user_profile->GetPrefs();
183 const std::string behavior = 183 const std::string behavior =
184 prefs->GetString(prefs::kMultiProfileUserBehavior); 184 prefs->GetString(prefs::kMultiProfileUserBehavior);
185 SetCachedValue(user_email, behavior); 185 SetCachedValue(user_email, behavior);
186 186
187 CheckSessionUsers(); 187 CheckSessionUsers();
188 } 188 }
189 189
190 } // namespace chromeos 190 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/merge_session_load_page.cc ('k') | chrome/browser/chromeos/login/oauth2_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698