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

Side by Side Diff: chrome/browser/sync/sync_setup_flow.cc

Issue 7508036: Added support for setting gaia_passphrase in SyncSetupFlow::OnUserConfigured. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/sync/sync_setup_flow.h" 5 #include "chrome/browser/sync/sync_setup_flow.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 syncable::ModelTypeSet data_types; 266 syncable::ModelTypeSet data_types;
267 service_->GetRegisteredDataTypes(&data_types); 267 service_->GetRegisteredDataTypes(&data_types);
268 service_->EncryptDataTypes(data_types); 268 service_->EncryptDataTypes(data_types);
269 } 269 }
270 270
271 // If we are activating the passphrase, we need to have one supplied. 271 // If we are activating the passphrase, we need to have one supplied.
272 DCHECK(service_->IsUsingSecondaryPassphrase() || 272 DCHECK(service_->IsUsingSecondaryPassphrase() ||
273 !configuration.use_secondary_passphrase || 273 !configuration.use_secondary_passphrase ||
274 configuration.secondary_passphrase.length() > 0); 274 configuration.secondary_passphrase.length() > 0);
275 275
276 if (!configuration.gaia_passphrase.empty()) {
277 // Caller passed a gaia passphrase. This is illegal if we are currently
278 // using a secondary passphrase.
279 DCHECK(!service_->IsUsingSecondaryPassphrase());
280 service_->SetPassphrase(configuration.gaia_passphrase, false, false);
281 }
282
276 if (configuration.use_secondary_passphrase) { 283 if (configuration.use_secondary_passphrase) {
277 if (!service_->IsUsingSecondaryPassphrase()) { 284 if (!service_->IsUsingSecondaryPassphrase()) {
278 service_->SetPassphrase(configuration.secondary_passphrase, true, true); 285 service_->SetPassphrase(configuration.secondary_passphrase, true, true);
279 tried_creating_explicit_passphrase_ = true; 286 tried_creating_explicit_passphrase_ = true;
280 } else { 287 } else {
281 service_->SetPassphrase(configuration.secondary_passphrase, true, false); 288 service_->SetPassphrase(configuration.secondary_passphrase, true, false);
282 tried_setting_explicit_passphrase_ = true; 289 tried_setting_explicit_passphrase_ = true;
283 } 290 }
284 } 291 }
285 292
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 break; 434 break;
428 } 435 }
429 case SyncSetupWizard::DONE: 436 case SyncSetupWizard::DONE:
430 flow_handler_->ShowSetupDone( 437 flow_handler_->ShowSetupDone(
431 UTF16ToWide(service_->GetAuthenticatedUsername())); 438 UTF16ToWide(service_->GetAuthenticatedUsername()));
432 break; 439 break;
433 default: 440 default:
434 NOTREACHED() << "Invalid advance state: " << state; 441 NOTREACHED() << "Invalid advance state: " << state;
435 } 442 }
436 } 443 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698