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

Side by Side Diff: chrome/browser/managed_mode/managed_user_registration_utility.cc

Issue 104493005: 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 6 years, 12 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 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/managed_mode/managed_user_registration_utility.h" 5 #include "chrome/browser/managed_mode/managed_user_registration_utility.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 void ManagedUserRegistrationUtilityImpl::Register( 196 void ManagedUserRegistrationUtilityImpl::Register(
197 const std::string& managed_user_id, 197 const std::string& managed_user_id,
198 const ManagedUserRegistrationInfo& info, 198 const ManagedUserRegistrationInfo& info,
199 const RegistrationCallback& callback) { 199 const RegistrationCallback& callback) {
200 DCHECK(pending_managed_user_id_.empty()); 200 DCHECK(pending_managed_user_id_.empty());
201 callback_ = callback; 201 callback_ = callback;
202 pending_managed_user_id_ = managed_user_id; 202 pending_managed_user_id_ = managed_user_id;
203 203
204 const DictionaryValue* dict = prefs_->GetDictionary(prefs::kManagedUsers); 204 const base::DictionaryValue* dict =
205 prefs_->GetDictionary(prefs::kManagedUsers);
205 is_existing_managed_user_ = dict->HasKey(managed_user_id); 206 is_existing_managed_user_ = dict->HasKey(managed_user_id);
206 if (!is_existing_managed_user_) { 207 if (!is_existing_managed_user_) {
207 managed_user_sync_service_->AddManagedUser(pending_managed_user_id_, 208 managed_user_sync_service_->AddManagedUser(pending_managed_user_id_,
208 base::UTF16ToUTF8(info.name), 209 base::UTF16ToUTF8(info.name),
209 info.master_key, 210 info.master_key,
210 info.avatar_index); 211 info.avatar_index);
211 } else { 212 } else {
212 avatar_updated_ = 213 avatar_updated_ =
213 managed_user_sync_service_->UpdateManagedUserAvatarIfNeeded( 214 managed_user_sync_service_->UpdateManagedUserAvatarIfNeeded(
214 managed_user_id, 215 managed_user_id,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 pending_managed_user_id_); 306 pending_managed_user_id_);
306 } 307 }
307 } 308 }
308 309
309 if (run_callback) 310 if (run_callback)
310 callback_.Run(error, pending_managed_user_token_); 311 callback_.Run(error, pending_managed_user_token_);
311 callback_.Reset(); 312 callback_.Reset();
312 } 313 }
313 314
314 } // namespace 315 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc ('k') | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698