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

Unified Diff: components/sync_driver/backup_rollback_controller.cc

Issue 1354883003: Componentize chrome/browser/sync/backup_rollback_controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/sync_driver/backup_rollback_controller.cc
diff --git a/chrome/browser/sync/backup_rollback_controller.cc b/components/sync_driver/backup_rollback_controller.cc
similarity index 90%
rename from chrome/browser/sync/backup_rollback_controller.cc
rename to components/sync_driver/backup_rollback_controller.cc
index a80d703da669e7f1be0ee237e25518e63e56f700..685cf6fe5327cb15474dfcc634cc7e7d6d37e61f 100644
--- a/chrome/browser/sync/backup_rollback_controller.cc
+++ b/components/sync_driver/backup_rollback_controller.cc
@@ -2,19 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/backup_rollback_controller.h"
+#include "components/sync_driver/backup_rollback_controller.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/metrics/field_trial.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
-#include "chrome/common/chrome_switches.h"
#include "components/sync_driver/signin_manager_wrapper.h"
#include "components/sync_driver/sync_driver_switches.h"
#include "components/sync_driver/sync_prefs.h"
-namespace browser_sync {
+namespace sync_driver {
#if defined(ENABLE_PRE_SYNC_BACKUP)
// Number of rollback attempts to try before giving up.
@@ -33,11 +32,9 @@ BackupRollbackController::BackupRollbackController(
: sync_prefs_(sync_prefs),
signin_(signin),
start_backup_(start_backup),
- start_rollback_(start_rollback) {
-}
+ start_rollback_(start_rollback) {}
-BackupRollbackController::~BackupRollbackController() {
-}
+BackupRollbackController::~BackupRollbackController() {}
bool BackupRollbackController::StartBackup() {
if (!IsBackupEnabled())
@@ -64,7 +61,7 @@ bool BackupRollbackController::StartRollback() {
int rollback_tries = sync_prefs_->GetRemainingRollbackTries();
if (rollback_tries <= 0)
- return false; // No pending rollback.
+ return false; // No pending rollback.
sync_prefs_->SetRemainingRollbackTries(rollback_tries - 1);
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, start_rollback_);
@@ -100,4 +97,4 @@ bool BackupRollbackController::IsBackupEnabled() {
#endif
}
-} // namespace browser_sync
+} // namespace sync_driver
« no previous file with comments | « components/sync_driver/backup_rollback_controller.h ('k') | components/sync_driver/backup_rollback_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698