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

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

Issue 3825005: Fix syncing of sessions. Numerous changes have been made. Currently, the mode... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebased again Created 10 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
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 "app/gfx/font_util.h" 7 #include "app/gfx/font_util.h"
8 #include "base/callback.h" 8 #include "base/callback.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return false; 121 return false;
122 if (sync_extensions) 122 if (sync_extensions)
123 config->data_types.insert(syncable::EXTENSIONS); 123 config->data_types.insert(syncable::EXTENSIONS);
124 124
125 bool sync_typed_urls; 125 bool sync_typed_urls;
126 if (!result->GetBoolean("syncTypedUrls", &sync_typed_urls)) 126 if (!result->GetBoolean("syncTypedUrls", &sync_typed_urls))
127 return false; 127 return false;
128 if (sync_typed_urls) 128 if (sync_typed_urls)
129 config->data_types.insert(syncable::TYPED_URLS); 129 config->data_types.insert(syncable::TYPED_URLS);
130 130
131 bool sync_sessions;
132 if (!result->GetBoolean("syncSessions", &sync_sessions))
133 return false;
134 if (sync_sessions)
135 config->data_types.insert(syncable::SESSIONS);
136
131 bool sync_apps; 137 bool sync_apps;
132 if (!result->GetBoolean("syncApps", &sync_apps)) 138 if (!result->GetBoolean("syncApps", &sync_apps))
133 return false; 139 return false;
134 if (sync_apps) 140 if (sync_apps)
135 config->data_types.insert(syncable::APPS); 141 config->data_types.insert(syncable::APPS);
136 142
137 // Encyption settings. 143 // Encyption settings.
138 if (!result->GetBoolean("usePassphrase", &config->use_secondary_passphrase)) 144 if (!result->GetBoolean("usePassphrase", &config->use_secondary_passphrase))
139 return false; 145 return false;
140 146
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 675
670 void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase) { 676 void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase) {
671 if (current_state_ == SyncSetupWizard::ENTER_PASSPHRASE) { 677 if (current_state_ == SyncSetupWizard::ENTER_PASSPHRASE) {
672 service_->SetSecondaryPassphrase(passphrase); 678 service_->SetSecondaryPassphrase(passphrase);
673 Advance(SyncSetupWizard::SETTING_UP); 679 Advance(SyncSetupWizard::SETTING_UP);
674 } else if (configuration_pending_) { 680 } else if (configuration_pending_) {
675 configuration_.secondary_passphrase = passphrase; 681 configuration_.secondary_passphrase = passphrase;
676 OnConfigurationComplete(); 682 OnConfigurationComplete();
677 } 683 }
678 } 684 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_session_unittest.cc ('k') | chrome/browser/sync/sync_setup_wizard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698