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

Side by Side Diff: chrome/browser/sync/sync_setup_flow.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 | « 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) 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 } 328 }
329 329
330 service_->OnUserChoseDatatypes(configuration.sync_everything, 330 service_->OnUserChoseDatatypes(configuration.sync_everything,
331 configuration.data_types); 331 configuration.data_types);
332 332
333 // See if we are done configuring (if we don't need a passphrase, and don't 333 // See if we are done configuring (if we don't need a passphrase, and don't
334 // need to hang around waiting for encryption to happen, just exit). This call 334 // need to hang around waiting for encryption to happen, just exit). This call
335 // to IsPassphraseRequiredForDecryption() takes into account the data types 335 // to IsPassphraseRequiredForDecryption() takes into account the data types
336 // we just enabled/disabled. 336 // we just enabled/disabled.
337 if (!service_->IsPassphraseRequiredForDecryption()) { 337 if (!service_->IsPassphraseRequiredForDecryption() &&
338 !service_->encryption_pending()) {
338 Advance(SyncSetupWizard::DONE); 339 Advance(SyncSetupWizard::DONE);
339 } else if (!set_new_decryption_passphrase) { 340 } else if (!set_new_decryption_passphrase) {
340 // We need a passphrase, but the user did not provide one, so transition 341 // We need a passphrase, but the user did not provide one, so transition
341 // directly to ENTER_PASSPHRASE (otherwise we'll have to wait until 342 // directly to ENTER_PASSPHRASE (otherwise we'll have to wait until
342 // the sync engine generates another OnPassphraseRequired() at the end of 343 // the sync engine generates another OnPassphraseRequired() at the end of
343 // the sync cycle which can take a long time). 344 // the sync cycle which can take a long time).
344 Advance(SyncSetupWizard::ENTER_PASSPHRASE); 345 Advance(SyncSetupWizard::ENTER_PASSPHRASE);
345 } 346 }
346 } 347 }
347 348
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 } 493 }
493 case SyncSetupWizard::DONE: 494 case SyncSetupWizard::DONE:
494 case SyncSetupWizard::ABORT: 495 case SyncSetupWizard::ABORT:
495 flow_handler_->ShowSetupDone( 496 flow_handler_->ShowSetupDone(
496 UTF16ToWide(service_->GetAuthenticatedUsername())); 497 UTF16ToWide(service_->GetAuthenticatedUsername()));
497 break; 498 break;
498 default: 499 default:
499 NOTREACHED() << "Invalid advance state: " << state; 500 NOTREACHED() << "Invalid advance state: " << state;
500 } 501 }
501 } 502 }
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