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

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

Issue 435463002: Enable rollback by default on trunk (m38). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/sync/backup_rollback_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/backup_rollback_controller.h" 5 #include "chrome/browser/sync/backup_rollback_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" 10 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h"
(...skipping 23 matching lines...) Expand all
34 weak_ptr_factory_(this) { 34 weak_ptr_factory_(this) {
35 } 35 }
36 36
37 BackupRollbackController::~BackupRollbackController() { 37 BackupRollbackController::~BackupRollbackController() {
38 } 38 }
39 39
40 void BackupRollbackController::Start(base::TimeDelta delay) { 40 void BackupRollbackController::Start(base::TimeDelta delay) {
41 if (!IsBackupEnabled()) 41 if (!IsBackupEnabled())
42 return; 42 return;
43 43
44 if (!CommandLine::ForCurrentProcess()->HasSwitch( 44 if (CommandLine::ForCurrentProcess()->HasSwitch(
45 switches::kSyncEnableRollback)) { 45 switches::kSyncDisableRollback)) {
46 sync_prefs_->SetRemainingRollbackTries(0); 46 sync_prefs_->SetRemainingRollbackTries(0);
47 } 47 }
48 48
49 if (delay == base::TimeDelta()) { 49 if (delay == base::TimeDelta()) {
50 TryStart(); 50 TryStart();
51 } else { 51 } else {
52 base::MessageLoop::current()->PostDelayedTask( 52 base::MessageLoop::current()->PostDelayedTask(
53 FROM_HERE, 53 FROM_HERE,
54 base::Bind(&BackupRollbackController::TryStart, 54 base::Bind(&BackupRollbackController::TryStart,
55 weak_ptr_factory_.GetWeakPtr()), 55 weak_ptr_factory_.GetWeakPtr()),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 group_name == kSyncBackupFinchDisabled) { 97 group_name == kSyncBackupFinchDisabled) {
98 return false; 98 return false;
99 } 99 }
100 return true; 100 return true;
101 #else 101 #else
102 return false; 102 return false;
103 #endif 103 #endif
104 } 104 }
105 105
106 } // namespace browser_sync 106 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/backup_rollback_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698