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

Unified Diff: components/sync/engine_impl/model_type_worker_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
Index: components/sync/engine_impl/model_type_worker_unittest.cc
diff --git a/components/sync/engine_impl/model_type_worker_unittest.cc b/components/sync/engine_impl/model_type_worker_unittest.cc
index 11222213b39a3f181943093937f3ae9ba68cfbd5..afd33e4be2bc2c6a943fd837f5a9e3ff12c6bd57 100644
--- a/components/sync/engine_impl/model_type_worker_unittest.cc
+++ b/components/sync/engine_impl/model_type_worker_unittest.cc
@@ -26,17 +26,23 @@
#include "components/sync/test/engine/single_type_mock_server.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace syncer {
+using syncer::Cryptographer;
+using syncer::CommitContribution;
+using syncer::KeyParams;
+using syncer::Nigori;
+using syncer::StatusController;
+
+namespace syncer_v2 {
namespace {
// Special constant value taken from cryptographer.cc.
const char kNigoriKeyName[] = "nigori-key";
-const ModelType kModelType = PREFERENCES;
+const syncer::ModelType kModelType = syncer::PREFERENCES;
std::string GenerateTagHash(const std::string& tag) {
- return syncable::GenerateSyncableHash(kModelType, tag);
+ return syncer::syncable::GenerateSyncableHash(kModelType, tag);
}
const char kTag1[] = "tag1";
@@ -427,11 +433,11 @@ class ModelTypeWorkerTest : public ::testing::Test {
MockModelTypeProcessor* processor() { return mock_type_processor_; }
ModelTypeWorker* worker() { return worker_.get(); }
- SingleTypeMockServer* server() { return &mock_server_; }
+ syncer::SingleTypeMockServer* server() { return &mock_server_; }
private:
// An encryptor for our cryptographer.
- FakeEncryptor fake_encryptor_;
+ syncer::FakeEncryptor fake_encryptor_;
// The cryptographer itself. Null if we're not encrypting the type.
std::unique_ptr<Cryptographer> cryptographer_;
@@ -454,11 +460,11 @@ class ModelTypeWorkerTest : public ::testing::Test {
// A mock that emulates enough of the sync server that it can be used
// a single UpdateHandler and CommitContributor pair. In this test
// harness, the |worker_| is both of them.
- SingleTypeMockServer mock_server_;
+ syncer::SingleTypeMockServer mock_server_;
// A mock to track the number of times the CommitQueue requests to
// sync.
- MockNudgeHandler mock_nudge_handler_;
+ syncer::MockNudgeHandler mock_nudge_handler_;
bool is_processor_disconnected_;
};
@@ -551,7 +557,7 @@ TEST_F(ModelTypeWorkerTest, SimpleDelete) {
// Deletions should contain enough specifics to identify the type.
EXPECT_TRUE(entity.has_specifics());
- EXPECT_EQ(kModelType, GetModelTypeFromSpecifics(entity.specifics()));
+ EXPECT_EQ(kModelType, syncer::GetModelTypeFromSpecifics(entity.specifics()));
// Verify the commit response returned to the model thread.
ASSERT_EQ(2U, processor()->GetNumCommitResponses());
@@ -1029,4 +1035,4 @@ TEST_F(ModelTypeWorkerTest, DisconnectProcessorFromSyncTest) {
EXPECT_TRUE(IsProcessorDisconnected());
}
-} // namespace syncer
+} // namespace syncer_v2
« no previous file with comments | « components/sync/engine_impl/model_type_worker.cc ('k') | components/sync/engine_impl/non_blocking_type_commit_contribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698