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

Side by Side Diff: chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.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 _new.h" 5 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller _new.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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 ManagedUserCreationControllerNew::UserCreationContext::UserCreationContext() {} 66 ManagedUserCreationControllerNew::UserCreationContext::UserCreationContext() {}
67 67
68 ManagedUserCreationControllerNew::UserCreationContext::~UserCreationContext() {} 68 ManagedUserCreationControllerNew::UserCreationContext::~UserCreationContext() {}
69 69
70 void ManagedUserCreationControllerNew::SetManagerProfile( 70 void ManagedUserCreationControllerNew::SetManagerProfile(
71 Profile* manager_profile) { 71 Profile* manager_profile) {
72 creation_context_->manager_profile = manager_profile; 72 creation_context_->manager_profile = manager_profile;
73 } 73 }
74 74
75 Profile* ManagedUserCreationControllerNew::GetManagerProfile() {
76 return creation_context_->manager_profile;
77 }
78
75 void ManagedUserCreationControllerNew::StartCreation( 79 void ManagedUserCreationControllerNew::StartCreation(
76 const base::string16& display_name, 80 const base::string16& display_name,
77 const std::string& password, 81 const std::string& password,
78 int avatar_index) { 82 int avatar_index) {
79 DCHECK(creation_context_); 83 DCHECK(creation_context_);
80 creation_context_->creation_type = NEW_USER; 84 creation_context_->creation_type = NEW_USER;
81 creation_context_->display_name = display_name; 85 creation_context_->display_name = display_name;
82 creation_context_->password = password; 86 creation_context_->password = password;
83 creation_context_->avatar_index = avatar_index; 87 creation_context_->avatar_index = avatar_index;
84 StartCreationImpl(); 88 StartCreationImpl();
(...skipping 13 matching lines...) Expand all
98 creation_context_->avatar_index = avatar_index; 102 creation_context_->avatar_index = avatar_index;
99 103
100 creation_context_->sync_user_id = sync_id; 104 creation_context_->sync_user_id = sync_id;
101 105
102 creation_context_->master_key = master_key; 106 creation_context_->master_key = master_key;
103 StartCreationImpl(); 107 StartCreationImpl();
104 } 108 }
105 109
106 void ManagedUserCreationControllerNew::StartImport( 110 void ManagedUserCreationControllerNew::StartImport(
107 const base::string16& display_name, 111 const base::string16& display_name,
108 const std::string& password,
109 int avatar_index, 112 int avatar_index,
110 const std::string& sync_id, 113 const std::string& sync_id,
111 const std::string& master_key, 114 const std::string& master_key,
112 const base::DictionaryValue* password_data, 115 const base::DictionaryValue* password_data,
113 const std::string& encryption_key, 116 const std::string& encryption_key,
114 const std::string& signature_key) { 117 const std::string& signature_key) {
115 DCHECK(creation_context_); 118 DCHECK(creation_context_);
116 creation_context_->creation_type = USER_IMPORT_OLD; 119 creation_context_->creation_type = USER_IMPORT_NEW;
117 120
118 creation_context_->display_name = display_name; 121 creation_context_->display_name = display_name;
119 creation_context_->password = password; 122
120 creation_context_->avatar_index = avatar_index; 123 creation_context_->avatar_index = avatar_index;
121 124
122 creation_context_->sync_user_id = sync_id; 125 creation_context_->sync_user_id = sync_id;
123 126
124 creation_context_->master_key = master_key; 127 creation_context_->master_key = master_key;
125 128
126 password_data->GetStringWithoutPathExpansion( 129 password_data->GetStringWithoutPathExpansion(
127 kEncryptedPassword, &creation_context_->salted_password); 130 kEncryptedPassword, &creation_context_->salted_password);
128 131
129 creation_context_->signature_key = signature_key; 132 creation_context_->signature_key = signature_key;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 creation_context_->registration_utility.reset(); 387 creation_context_->registration_utility.reset();
385 chrome::AttemptUserExit(); 388 chrome::AttemptUserExit();
386 } 389 }
387 390
388 std::string ManagedUserCreationControllerNew::GetManagedUserId() { 391 std::string ManagedUserCreationControllerNew::GetManagedUserId() {
389 DCHECK(creation_context_); 392 DCHECK(creation_context_);
390 return creation_context_->local_user_id; 393 return creation_context_->local_user_id;
391 } 394 }
392 395
393 } // namespace chromeos 396 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698