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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2528163002: Rewire the local sync switches through the pref store. (Closed)
Patch Set: Comment new SyncPrefs methods. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/chrome_command_line_pref_store.cc ('k') | components/sync/base/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 222bf630f96bd08c20110da89d0b116b722e6980..e13f08d5615d0ddd7bdb3d53e8d3ba96957480d6 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -507,16 +507,11 @@ void ProfileSyncService::InitializeBackend(bool delete_stale_data) {
ClearStaleErrors();
bool enable_local_sync_backend = false;
- base::FilePath local_sync_backend_folder;
+ base::FilePath local_sync_backend_folder =
+ sync_prefs_.GetLocalSyncBackendDir();
#if defined(OS_WIN)
- enable_local_sync_backend = base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableLocalSyncBackend);
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kLocalSyncBackendDir)) {
- local_sync_backend_folder =
- base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
- switches::kLocalSyncBackendDir);
- } else {
+ enable_local_sync_backend = sync_prefs_.IsLocalSyncEnabled();
+ if (local_sync_backend_folder.empty()) {
// TODO(pastarmovj): Add DIR_ROAMING_USER_DATA to PathService to simplify
// this code and move the logic in its right place. See crbug/657810.
CHECK(
« no previous file with comments | « chrome/browser/prefs/chrome_command_line_pref_store.cc ('k') | components/sync/base/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698