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

Unified Diff: components/sync_driver/backup_rollback_controller.cc

Issue 1487873003: Convert enable_pre_sync_backup flag to new flags system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 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 | « components/sync_driver/BUILD.gn ('k') | components/sync_driver/backup_rollback_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/backup_rollback_controller.cc
diff --git a/components/sync_driver/backup_rollback_controller.cc b/components/sync_driver/backup_rollback_controller.cc
index b33bd6065e1b95a7edbed2c09b71a8c398b16ce8..362997314d0d13c7f83263523e5882c4ddb8468b 100644
--- a/components/sync_driver/backup_rollback_controller.cc
+++ b/components/sync_driver/backup_rollback_controller.cc
@@ -12,12 +12,13 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "components/sync_driver/signin_manager_wrapper.h"
+#include "components/sync_driver/sync_driver_features.h"
#include "components/sync_driver/sync_driver_switches.h"
#include "components/sync_driver/sync_prefs.h"
namespace sync_driver {
-#if defined(ENABLE_PRE_SYNC_BACKUP)
+#if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
// Number of rollback attempts to try before giving up.
static const int kRollbackLimits = 3;
@@ -71,20 +72,20 @@ bool BackupRollbackController::StartRollback() {
}
void BackupRollbackController::OnRollbackReceived() {
-#if defined(ENABLE_PRE_SYNC_BACKUP)
+#if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
sync_prefs_->SetRemainingRollbackTries(kRollbackLimits);
#endif
}
void BackupRollbackController::OnRollbackDone() {
-#if defined(ENABLE_PRE_SYNC_BACKUP)
+#if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
sync_prefs_->SetRemainingRollbackTries(0);
#endif
}
// static
bool BackupRollbackController::IsBackupEnabled() {
-#if defined(ENABLE_PRE_SYNC_BACKUP)
+#if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
const std::string group_name =
base::FieldTrialList::FindFullName(kSyncBackupFinchName);
« no previous file with comments | « components/sync_driver/BUILD.gn ('k') | components/sync_driver/backup_rollback_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698