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

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

Issue 8303004: [Sync] Only step to done in wizard if encryption is complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add case to sync setup flow Created 9 years, 2 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 | « no previous file | chrome/browser/sync/sync_setup_flow.cc » ('j') | 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/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 if (data_type_manager_.get()) { 810 if (data_type_manager_.get()) {
811 // Unblock the data type manager if necessary. 811 // Unblock the data type manager if necessary.
812 // This will always trigger a SYNC_CONFIGURE_DONE on completion, which will 812 // This will always trigger a SYNC_CONFIGURE_DONE on completion, which will
813 // step the UI wizard into DONE state (even if no datatypes have changed). 813 // step the UI wizard into DONE state (even if no datatypes have changed).
814 // This will be ignored, because we will already have transitioned to DONE 814 // This will be ignored, because we will already have transitioned to DONE
815 // below. 815 // below.
816 data_type_manager_->Configure(types, 816 data_type_manager_->Configure(types,
817 sync_api::CONFIGURE_REASON_RECONFIGURATION); 817 sync_api::CONFIGURE_REASON_RECONFIGURATION);
818 } 818 }
819 819
820 // No encryption is pending, our passphrase has been accepted, so tell the 820 // If No encryption is pending and our passphrase has been accepted, tell the
821 // wizard we're done (no need to hang around waiting for the sync to 821 // wizard we're done (no need to hang around waiting for the sync to
822 // complete). 822 // complete). If encryption is pending, its successful completion will trigger
823 if (WizardIsVisible()) 823 // the done step.
824 if (WizardIsVisible() && !encryption_pending())
824 wizard_.Step(SyncSetupWizard::DONE); 825 wizard_.Step(SyncSetupWizard::DONE);
825 826
826 NotifyObservers(); 827 NotifyObservers();
827 } 828 }
828 829
829 void ProfileSyncService::OnEncryptionComplete( 830 void ProfileSyncService::OnEncryptionComplete(
830 const syncable::ModelTypeSet& encrypted_types) { 831 const syncable::ModelTypeSet& encrypted_types) {
831 if (encryption_pending_) { 832 if (encryption_pending_) {
832 syncable::ModelTypeSet registered_types; 833 syncable::ModelTypeSet registered_types;
833 GetRegisteredDataTypes(&registered_types); 834 GetRegisteredDataTypes(&registered_types);
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 << "Unrecoverable error."; 1523 << "Unrecoverable error.";
1523 } else { 1524 } else {
1524 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1525 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1525 << "initialized"; 1526 << "initialized";
1526 } 1527 }
1527 } 1528 }
1528 1529
1529 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1530 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1530 return failed_datatypes_handler_; 1531 return failed_datatypes_handler_;
1531 } 1532 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/sync_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698