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

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

Issue 6581023: Merge 75769 - When enabling password sync manually, use the passphrase migrat... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/src/
Patch Set: Created 9 years, 10 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/profile_sync_service.cc ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // We don't own flow_handler_ anymore, but it sticks around until at least 540 // We don't own flow_handler_ anymore, but it sticks around until at least
541 // right after OnDialogClosed() is called (and this object is destroyed). 541 // right after OnDialogClosed() is called (and this object is destroyed).
542 owns_flow_handler_ = false; 542 owns_flow_handler_ = false;
543 } 543 }
544 544
545 // Returns true if the flow should advance to |state| based on |current_state_|. 545 // Returns true if the flow should advance to |state| based on |current_state_|.
546 bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) { 546 bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) {
547 switch (state) { 547 switch (state) {
548 case SyncSetupWizard::GAIA_LOGIN: 548 case SyncSetupWizard::GAIA_LOGIN:
549 return current_state_ == SyncSetupWizard::FATAL_ERROR || 549 return current_state_ == SyncSetupWizard::FATAL_ERROR ||
550 current_state_ == SyncSetupWizard::GAIA_LOGIN; 550 current_state_ == SyncSetupWizard::GAIA_LOGIN ||
551 current_state_ == SyncSetupWizard::SETTING_UP;
551 case SyncSetupWizard::GAIA_SUCCESS: 552 case SyncSetupWizard::GAIA_SUCCESS:
552 return current_state_ == SyncSetupWizard::GAIA_LOGIN; 553 return current_state_ == SyncSetupWizard::GAIA_LOGIN;
553 case SyncSetupWizard::CONFIGURE: 554 case SyncSetupWizard::CONFIGURE:
554 return current_state_ == SyncSetupWizard::GAIA_SUCCESS; 555 return current_state_ == SyncSetupWizard::GAIA_SUCCESS;
555 case SyncSetupWizard::ENTER_PASSPHRASE: 556 case SyncSetupWizard::ENTER_PASSPHRASE:
556 return current_state_ == SyncSetupWizard::CONFIGURE || 557 return current_state_ == SyncSetupWizard::CONFIGURE ||
557 current_state_ == SyncSetupWizard::SETTING_UP; 558 current_state_ == SyncSetupWizard::SETTING_UP;
558 case SyncSetupWizard::PASSPHRASE_MIGRATION: 559 case SyncSetupWizard::PASSPHRASE_MIGRATION:
559 return current_state_ == SyncSetupWizard::GAIA_LOGIN; 560 return current_state_ == SyncSetupWizard::GAIA_LOGIN;
560 case SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR: 561 case SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR:
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 service_->OnUserChoseDatatypes(false, registered_types); 754 service_->OnUserChoseDatatypes(false, registered_types);
754 } else if (option == "google") { 755 } else if (option == "google") {
755 // Implicit passphrase already set up. 756 // Implicit passphrase already set up.
756 Advance(SyncSetupWizard::DONE); 757 Advance(SyncSetupWizard::DONE);
757 } 758 }
758 } 759 }
759 760
760 void SyncSetupFlow::OnGoToDashboard() { 761 void SyncSetupFlow::OnGoToDashboard() {
761 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); 762 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate();
762 } 763 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698