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

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

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. 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 da29244c6ad372357e68b3302bc3bf676316bdb6..f3f2873a470761fec98d6ddf364364c643799175 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 browser_sync {
+namespace syncer {
namespace {
@@ -36,7 +36,7 @@ enum DeferredInitTrigger {
} // namespace
-StartupController::StartupController(const sync_driver::SyncPrefs* sync_prefs,
+StartupController::StartupController(const SyncPrefs* sync_prefs,
base::Callback<bool()> can_start,
base::Closure start_backend)
: bypass_setup_complete_(false),
@@ -65,7 +65,7 @@ StartupController::StartupController(const sync_driver::SyncPrefs* sync_prefs,
StartupController::~StartupController() {}
-void StartupController::Reset(const syncer::ModelTypeSet registered_types) {
+void StartupController::Reset(const ModelTypeSet registered_types) {
received_start_request_ = false;
bypass_setup_complete_ = false;
start_up_time_ = base::Time();
@@ -90,8 +90,7 @@ bool StartupController::StartUp(StartUpDeferredOption deferred_option) {
if (deferred_option == STARTUP_BACKEND_DEFERRED &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup) &&
- sync_prefs_->GetPreferredDataTypes(registered_types_)
- .Has(syncer::SESSIONS)) {
+ sync_prefs_->GetPreferredDataTypes(registered_types_).Has(SESSIONS)) {
if (first_start) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
@@ -174,25 +173,23 @@ std::string StartupController::GetBackendInitializationStateString() const {
return "Not started";
}
-void StartupController::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
+void StartupController::OnDataTypeRequestsSyncStartup(ModelType type) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup)) {
DVLOG(2) << "Ignoring data type request for sync startup: "
- << syncer::ModelTypeToString(type);
+ << ModelTypeToString(type);
return;
}
if (!start_backend_time_.is_null())
return;
- DVLOG(2) << "Data type requesting sync startup: "
- << syncer::ModelTypeToString(type);
+ DVLOG(2) << "Data type requesting sync startup: " << 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),
- syncer::MODEL_TYPE_COUNT);
+ ModelTypeToHistogramInt(type), MODEL_TYPE_COUNT);
if (!start_up_time_.is_null()) {
RecordTimeDeferred();
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger",
@@ -202,4 +199,4 @@ void StartupController::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
TryStart();
}
-} // namespace browser_sync
+} // namespace syncer
« 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