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

Unified Diff: components/sync/driver/startup_controller_unittest.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.cc ('k') | components/sync/driver/sync_api_component_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/startup_controller_unittest.cc
diff --git a/components/sync/driver/startup_controller_unittest.cc b/components/sync/driver/startup_controller_unittest.cc
index 0bbe34c99e7c4760269e982b92cd2694fd68c730..fbc0ec49c0af13b26670219635657065f1becaee 100644
--- a/components/sync/driver/startup_controller_unittest.cc
+++ b/components/sync/driver/startup_controller_unittest.cc
@@ -15,7 +15,7 @@
#include "components/syncable_prefs/testing_pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace syncer {
+namespace browser_sync {
// These are coupled to the implementation of StartupController's
// GetBackendInitializationStateString which is used by about:sync. We use it
@@ -30,14 +30,14 @@ class StartupControllerTest : public testing::Test {
StartupControllerTest() : can_start_(false), started_(false) {}
void SetUp() override {
- SyncPrefs::RegisterProfilePrefs(pref_service_.registry());
- sync_prefs_.reset(new SyncPrefs(&pref_service_));
+ sync_driver::SyncPrefs::RegisterProfilePrefs(pref_service_.registry());
+ sync_prefs_.reset(new sync_driver::SyncPrefs(&pref_service_));
controller_.reset(new StartupController(
sync_prefs_.get(),
base::Bind(&StartupControllerTest::CanStart, base::Unretained(this)),
base::Bind(&StartupControllerTest::FakeStartBackend,
base::Unretained(this))));
- controller_->Reset(UserTypes());
+ controller_->Reset(syncer::UserTypes());
controller_->OverrideFallbackTimeoutForTest(
base::TimeDelta::FromSeconds(0));
}
@@ -75,14 +75,14 @@ class StartupControllerTest : public testing::Test {
bool started() const { return started_; }
void clear_started() { started_ = false; }
StartupController* controller() { return controller_.get(); }
- SyncPrefs* sync_prefs() { return sync_prefs_.get(); }
+ sync_driver::SyncPrefs* sync_prefs() { return sync_prefs_.get(); }
private:
bool can_start_;
bool started_;
base::MessageLoop message_loop_;
syncable_prefs::TestingPrefServiceSyncable pref_service_;
- std::unique_ptr<SyncPrefs> sync_prefs_;
+ std::unique_ptr<sync_driver::SyncPrefs> sync_prefs_;
std::unique_ptr<StartupController> controller_;
};
@@ -108,7 +108,7 @@ TEST_F(StartupControllerTest, DefersAfterFirstSetupComplete) {
TEST_F(StartupControllerTest, NoDeferralDataTypeTrigger) {
sync_prefs()->SetFirstSetupComplete();
SetCanStart(true);
- controller()->OnDataTypeRequestsSyncStartup(SESSIONS);
+ controller()->OnDataTypeRequestsSyncStartup(syncer::SESSIONS);
ExpectStarted();
}
@@ -120,7 +120,7 @@ TEST_F(StartupControllerTest, DataTypeTriggerInterruptsDeferral) {
controller()->TryStart();
ExpectStartDeferred();
- controller()->OnDataTypeRequestsSyncStartup(SESSIONS);
+ controller()->OnDataTypeRequestsSyncStartup(syncer::SESSIONS);
ExpectStarted();
// The fallback timer shouldn't result in another invocation of the closure
@@ -144,15 +144,15 @@ TEST_F(StartupControllerTest, FallbackTimer) {
// Test that we start immediately if sessions is disabled.
TEST_F(StartupControllerTest, NoDeferralWithoutSessionsSync) {
- ModelTypeSet types(UserTypes());
+ syncer::ModelTypeSet types(syncer::UserTypes());
// Disabling sessions means disabling 4 types due to groupings.
- types.Remove(SESSIONS);
- types.Remove(PROXY_TABS);
- types.Remove(TYPED_URLS);
- types.Remove(SUPERVISED_USER_SETTINGS);
+ types.Remove(syncer::SESSIONS);
+ types.Remove(syncer::PROXY_TABS);
+ types.Remove(syncer::TYPED_URLS);
+ types.Remove(syncer::SUPERVISED_USER_SETTINGS);
sync_prefs()->SetKeepEverythingSynced(false);
- sync_prefs()->SetPreferredDataTypes(UserTypes(), types);
- controller()->Reset(UserTypes());
+ sync_prefs()->SetPreferredDataTypes(syncer::UserTypes(), types);
+ controller()->Reset(syncer::UserTypes());
sync_prefs()->SetFirstSetupComplete();
SetCanStart(true);
@@ -204,10 +204,10 @@ TEST_F(StartupControllerTest, ResetDuringSetup) {
controller()->SetSetupInProgress(true);
// This could happen if the UI triggers a stop-syncing permanently call.
- controller()->Reset(UserTypes());
+ controller()->Reset(syncer::UserTypes());
// From the UI's point of view, setup is still in progress.
EXPECT_TRUE(controller()->IsSetupInProgress());
}
-} // namespace syncer
+} // namespace browser_sync
« no previous file with comments | « components/sync/driver/startup_controller.cc ('k') | components/sync/driver/sync_api_component_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698