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

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

Issue 438005: Enable sync by default on all platforms. (Closed)
Patch Set: Synced to head Created 11 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/cocoa/bug_report_window_controller_unittest.mm ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 void ProfileSyncService::SyncEvent(SyncEventCodes code) { 419 void ProfileSyncService::SyncEvent(SyncEventCodes code) {
420 static LinearHistogram histogram("Sync.EventCodes", MIN_SYNC_EVENT_CODE, 420 static LinearHistogram histogram("Sync.EventCodes", MIN_SYNC_EVENT_CODE,
421 MAX_SYNC_EVENT_CODE - 1, 421 MAX_SYNC_EVENT_CODE - 1,
422 MAX_SYNC_EVENT_CODE); 422 MAX_SYNC_EVENT_CODE);
423 histogram.SetFlags(kUmaTargetedHistogramFlag); 423 histogram.SetFlags(kUmaTargetedHistogramFlag);
424 histogram.Add(code); 424 histogram.Add(code);
425 } 425 }
426 426
427 bool ProfileSyncService::IsSyncEnabled() { 427 bool ProfileSyncService::IsSyncEnabled() {
428 #if defined(OS_POSIX) 428 // We have switches::kEnableSync just in case we need to change back to
429 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableSync); 429 // sync-disabled-by-default on a platform.
430 #else
431 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync); 430 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync);
432 #endif
433 } 431 }
434 432
435 bool ProfileSyncService::ShouldPushChanges() { 433 bool ProfileSyncService::ShouldPushChanges() {
436 // True only after all bootstrapping has succeeded: the bookmark model is 434 // True only after all bootstrapping has succeeded: the bookmark model is
437 // loaded, the sync backend is initialized, the two domains are 435 // loaded, the sync backend is initialized, the two domains are
438 // consistent with one another, and no unrecoverable error has transpired. 436 // consistent with one another, and no unrecoverable error has transpired.
439 return change_processor_->IsRunning(); 437 return change_processor_->IsRunning();
440 } 438 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bug_report_window_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698