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

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

Issue 8921025: Call SetPassphrase() to re-encrypt the user's data after re-auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « no previous file | 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 break; 431 break;
432 } 432 }
433 case SyncSetupWizard::GAIA_LOGIN: { 433 case SyncSetupWizard::GAIA_LOGIN: {
434 DictionaryValue args; 434 DictionaryValue args;
435 SyncSetupFlow::GetArgsForGaiaLogin(service_, &args); 435 SyncSetupFlow::GetArgsForGaiaLogin(service_, &args);
436 flow_handler_->ShowGaiaLogin(args); 436 flow_handler_->ShowGaiaLogin(args);
437 break; 437 break;
438 } 438 }
439 case SyncSetupWizard::GAIA_SUCCESS: 439 case SyncSetupWizard::GAIA_SUCCESS:
440 if (end_state_ == SyncSetupWizard::GAIA_SUCCESS) { 440 if (end_state_ == SyncSetupWizard::GAIA_SUCCESS) {
441 // The user has just re-authed - set the passphrase so we can re-encrypt
442 // if necessary. If we are currently encrypting with an explicit
443 // passphrase, this does nothing.
444 // TODO(atwilson): Move all the code dealing with the implicit GAIA
445 // passphrase back into ProfileSyncService in a
446 // NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL listener once we get rid of
447 // SyncSetupFlow.
448 if (!cached_passphrase_.empty())
449 service_->SetPassphrase(cached_passphrase_, false);
441 flow_handler_->ShowGaiaSuccessAndClose(); 450 flow_handler_->ShowGaiaSuccessAndClose();
442 break; 451 break;
443 } 452 }
444 flow_handler_->ShowGaiaSuccessAndSettingUp(); 453 flow_handler_->ShowGaiaSuccessAndSettingUp();
445 break; 454 break;
446 case SyncSetupWizard::SYNC_EVERYTHING: { 455 case SyncSetupWizard::SYNC_EVERYTHING: {
447 DictionaryValue args; 456 DictionaryValue args;
448 SyncSetupFlow::GetArgsForConfigure(service_, &args); 457 SyncSetupFlow::GetArgsForConfigure(service_, &args);
449 args.SetBoolean("showSyncEverythingPage", true); 458 args.SetBoolean("showSyncEverythingPage", true);
450 flow_handler_->ShowConfigure(args); 459 flow_handler_->ShowConfigure(args);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 case SyncSetupWizard::DONE: 503 case SyncSetupWizard::DONE:
495 case SyncSetupWizard::ABORT: 504 case SyncSetupWizard::ABORT:
496 flow_handler_->ShowSetupDone(UTF8ToUTF16( 505 flow_handler_->ShowSetupDone(UTF8ToUTF16(
497 service_->profile()->GetPrefs()->GetString( 506 service_->profile()->GetPrefs()->GetString(
498 prefs::kGoogleServicesUsername))); 507 prefs::kGoogleServicesUsername)));
499 break; 508 break;
500 default: 509 default:
501 NOTREACHED() << "Invalid advance state: " << state; 510 NOTREACHED() << "Invalid advance state: " << state;
502 } 511 }
503 } 512 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698