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

Side by Side Diff: chrome/browser/chromeos/login/managed/managed_user_creation_controller_old.cc

Issue 220913003: Make supervised user ChromeOS import aware of new password schema. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/managed/managed_user_creation_controller _old.h" 5 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller _old.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 DCHECK(creation_context_); 88 DCHECK(creation_context_);
89 creation_context_->creation_type = USER_IMPORT; 89 creation_context_->creation_type = USER_IMPORT;
90 creation_context_->display_name = display_name; 90 creation_context_->display_name = display_name;
91 creation_context_->password = password; 91 creation_context_->password = password;
92 creation_context_->avatar_index = avatar_index; 92 creation_context_->avatar_index = avatar_index;
93 creation_context_->sync_user_id = sync_id; 93 creation_context_->sync_user_id = sync_id;
94 creation_context_->master_key = master_key; 94 creation_context_->master_key = master_key;
95 StartCreation(); 95 StartCreation();
96 } 96 }
97 97
98 void ManagedUserCreationControllerOld::StartImport(
99 const base::string16& display_name,
100 int avatar_index,
101 const std::string& sync_id,
102 const std::string& master_key,
103 const base::DictionaryValue* password_data,
104 const std::string& encryption_key,
105 const std::string& signature_key) {
106 NOTREACHED();
107 }
108
98 void ManagedUserCreationControllerOld::SetManagerProfile( 109 void ManagedUserCreationControllerOld::SetManagerProfile(
99 Profile* manager_profile) { 110 Profile* manager_profile) {
100 creation_context_->manager_profile = manager_profile; 111 creation_context_->manager_profile = manager_profile;
101 } 112 }
102 113
114 Profile* ManagedUserCreationControllerOld::GetManagerProfile() {
115 return creation_context_->manager_profile;
116 }
117
103 void ManagedUserCreationControllerOld::StartCreation() { 118 void ManagedUserCreationControllerOld::StartCreation() {
104 DCHECK(creation_context_); 119 DCHECK(creation_context_);
105 VLOG(1) << "Starting supervised user creation"; 120 VLOG(1) << "Starting supervised user creation";
106 121
107 ProfileSyncService* sync_service = 122 ProfileSyncService* sync_service =
108 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 123 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
109 creation_context_->manager_profile); 124 creation_context_->manager_profile);
110 ProfileSyncService::SyncStatusSummary status = 125 ProfileSyncService::SyncStatusSummary status =
111 sync_service->QuerySyncStatusSummary(); 126 sync_service->QuerySyncStatusSummary();
112 127
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Assume that new token is valid. It will be automatically invalidated if 293 // Assume that new token is valid. It will be automatically invalidated if
279 // sync service fails to use it. 294 // sync service fails to use it.
280 UserManager::Get()->SaveUserOAuthStatus(creation_context_->local_user_id, 295 UserManager::Get()->SaveUserOAuthStatus(creation_context_->local_user_id,
281 User::OAUTH2_TOKEN_STATUS_VALID); 296 User::OAUTH2_TOKEN_STATUS_VALID);
282 UserManager::Get()->GetSupervisedUserManager()->CommitCreationTransaction(); 297 UserManager::Get()->GetSupervisedUserManager()->CommitCreationTransaction();
283 if (consumer_) 298 if (consumer_)
284 consumer_->OnCreationSuccess(); 299 consumer_->OnCreationSuccess();
285 } 300 }
286 301
287 } // namespace chromeos 302 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698