summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sync_setup_flow.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 21:10:21 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 21:10:21 +0000
commit41ef4508ee9980a2945514ba2f913d1bf64ee326 (patch)
treebc15a721ad72de224856f229a086abfa109a0384 /chrome/browser/sync/sync_setup_flow.cc
parent448644f367ad072a82d095615a98f2ab6bf2822b (diff)
downloadchromium_src-41ef4508ee9980a2945514ba2f913d1bf64ee326.zip
chromium_src-41ef4508ee9980a2945514ba2f913d1bf64ee326.tar.gz
chromium_src-41ef4508ee9980a2945514ba2f913d1bf64ee326.tar.bz2
Added classes to enable session sync functionality.
TEST=ProfileSyncServiceSessionTest BUG=30519 Original patch by jerrica@chromium.org Original review: http://codereview.chromium.org/3168009 Review URL: http://codereview.chromium.org/3184004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sync_setup_flow.cc')
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index b320247..b8fc556 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -106,6 +106,12 @@ static bool GetDataTypeChoiceData(const std::string& json,
if (sync_extensions)
data_types->insert(syncable::EXTENSIONS);
+ bool sync_sessions;
+ if (!result->GetBoolean("syncSessions", &sync_sessions))
+ return false;
+ if (sync_sessions)
+ data_types->insert(syncable::SESSIONS);
+
bool sync_typed_urls;
if (!result->GetBoolean("syncTypedUrls", &sync_typed_urls))
return false;
@@ -188,7 +194,6 @@ void FlowHandler::ShowGaiaSuccessAndSettingUp() {
// Called by SyncSetupFlow::Advance.
void FlowHandler::ShowChooseDataTypes(const DictionaryValue& args) {
-
// If you're starting the wizard at the Choose Data Types screen (i.e. from
// "Customize Sync"), this will be redundant. However, if you're coming from
// another wizard state, this will make sure Choose Data Types is on top.
@@ -361,7 +366,8 @@ void SyncSetupFlow::GetArgsForChooseDataTypes(ProfileSyncService* service,
registered_types.count(syncable::TYPED_URLS) > 0);
args->SetBoolean("appsRegistered",
registered_types.count(syncable::APPS) > 0);
-
+ args->SetBoolean("sessionsRegistered",
+ registered_types.count(syncable::SESSIONS) > 0);
args->SetBoolean("syncBookmarks",
service->profile()->GetPrefs()->GetBoolean(prefs::kSyncBookmarks));
args->SetBoolean("syncPreferences",
@@ -374,6 +380,8 @@ void SyncSetupFlow::GetArgsForChooseDataTypes(ProfileSyncService* service,
service->profile()->GetPrefs()->GetBoolean(prefs::kSyncAutofill));
args->SetBoolean("syncExtensions",
service->profile()->GetPrefs()->GetBoolean(prefs::kSyncExtensions));
+ args->SetBoolean("syncSessions",
+ service->profile()->GetPrefs()->GetBoolean(prefs::kSyncSessions));
args->SetBoolean("syncTypedUrls",
service->profile()->GetPrefs()->GetBoolean(prefs::kSyncTypedUrls));
args->SetBoolean("syncApps",