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

Unified Diff: components/sync/driver/startup_controller.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/sync/driver/startup_controller.h ('k') | components/sync/driver/startup_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/startup_controller.cc
diff --git a/components/sync/driver/startup_controller.cc b/components/sync/driver/startup_controller.cc
index f3f2873a470761fec98d6ddf364364c643799175..da29244c6ad372357e68b3302bc3bf676316bdb6 100644
--- a/components/sync/driver/startup_controller.cc
+++ b/components/sync/driver/startup_controller.cc
@@ -15,7 +15,7 @@
#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/driver/sync_prefs.h"
-namespace syncer {
+namespace browser_sync {
namespace {
@@ -36,7 +36,7 @@ enum DeferredInitTrigger {
} // namespace
-StartupController::StartupController(const SyncPrefs* sync_prefs,
+StartupController::StartupController(const sync_driver::SyncPrefs* sync_prefs,
base::Callback<bool()> can_start,
base::Closure start_backend)
: bypass_setup_complete_(false),
@@ -65,7 +65,7 @@ StartupController::StartupController(const SyncPrefs* sync_prefs,
StartupController::~StartupController() {}
-void StartupController::Reset(const ModelTypeSet registered_types) {
+void StartupController::Reset(const syncer::ModelTypeSet registered_types) {
received_start_request_ = false;
bypass_setup_complete_ = false;
start_up_time_ = base::Time();
@@ -90,7 +90,8 @@ bool StartupController::StartUp(StartUpDeferredOption deferred_option) {
if (deferred_option == STARTUP_BACKEND_DEFERRED &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup) &&
- sync_prefs_->GetPreferredDataTypes(registered_types_).Has(SESSIONS)) {
+ sync_prefs_->GetPreferredDataTypes(registered_types_)
+ .Has(syncer::SESSIONS)) {
if (first_start) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
@@ -173,23 +174,25 @@ std::string StartupController::GetBackendInitializationStateString() const {
return "Not started";
}
-void StartupController::OnDataTypeRequestsSyncStartup(ModelType type) {
+void StartupController::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup)) {
DVLOG(2) << "Ignoring data type request for sync startup: "
- << ModelTypeToString(type);
+ << syncer::ModelTypeToString(type);
return;
}
if (!start_backend_time_.is_null())
return;
- DVLOG(2) << "Data type requesting sync startup: " << ModelTypeToString(type);
+ DVLOG(2) << "Data type requesting sync startup: "
+ << syncer::ModelTypeToString(type);
// Measure the time spent waiting for init and the type that triggered it.
// We could measure the time spent deferred on a per-datatype basis, but
// for now this is probably sufficient.
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.TypeTriggeringInit",
- ModelTypeToHistogramInt(type), MODEL_TYPE_COUNT);
+ ModelTypeToHistogramInt(type),
+ syncer::MODEL_TYPE_COUNT);
if (!start_up_time_.is_null()) {
RecordTimeDeferred();
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger",
@@ -199,4 +202,4 @@ void StartupController::OnDataTypeRequestsSyncStartup(ModelType type) {
TryStart();
}
-} // namespace syncer
+} // namespace browser_sync
« no previous file with comments | « components/sync/driver/startup_controller.h ('k') | components/sync/driver/startup_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698