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

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

Issue 425015: Disable sync. (Will be committed on beta branch only, and this CL will be immediately reverted.) (Closed)
Patch Set: Created 11 years, 1 month 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 | « no previous file | 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #if defined(OS_POSIX)
429 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableSync); 429 return false;
430 #else 430 #else
431 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync); 431 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync);
432 #endif 432 #endif
433 } 433 }
434 434
435 bool ProfileSyncService::ShouldPushChanges() { 435 bool ProfileSyncService::ShouldPushChanges() {
436 // True only after all bootstrapping has succeeded: the bookmark model is 436 // True only after all bootstrapping has succeeded: the bookmark model is
437 // loaded, the sync backend is initialized, the two domains are 437 // loaded, the sync backend is initialized, the two domains are
438 // consistent with one another, and no unrecoverable error has transpired. 438 // consistent with one another, and no unrecoverable error has transpired.
439 return change_processor_->IsRunning(); 439 return change_processor_->IsRunning();
440 } 440 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698