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

Unified Diff: components/sync/engine_impl/model_type_worker_unittest.cc

Issue 2420213002: [USS] Show USS counters in Types tab (Closed)
Patch Set: git 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
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 47b5385fd90eae1c9006e2183e4f67db870dc70d..63c69641dfc1d6436517d718a7d120a0b40cf018 100644
--- a/components/sync/engine_impl/model_type_worker_unittest.cc
+++ b/components/sync/engine_impl/model_type_worker_unittest.cc
@@ -14,6 +14,7 @@
#include "components/sync/base/fake_encryptor.h"
#include "components/sync/engine/model_type_processor.h"
#include "components/sync/engine_impl/commit_contribution.h"
+#include "components/sync/engine_impl/cycle/non_blocking_type_debug_info_emitter.h"
#include "components/sync/engine_impl/cycle/status_controller.h"
#include "components/sync/syncable/syncable_util.h"
#include "components/sync/test/engine/mock_model_type_processor.h"
@@ -131,7 +132,8 @@ class ModelTypeWorkerTest : public ::testing::Test {
update_encryption_filter_index_(0),
mock_type_processor_(nullptr),
mock_server_(kModelType),
- is_processor_disconnected_(false) {}
+ is_processor_disconnected_(false),
+ preferences_emitter_(kModelType, &type_observers_) {}
~ModelTypeWorkerTest() override {}
@@ -189,9 +191,9 @@ class ModelTypeWorkerTest : public ::testing::Test {
}
// TODO(maxbogue): crbug.com/529498: Inject pending updates somehow.
- worker_.reset(
- new ModelTypeWorker(kModelType, state, std::move(cryptographer_copy),
- &mock_nudge_handler_, std::move(processor)));
+ worker_.reset(new ModelTypeWorker(
pavely 2016/10/19 18:18:59 The purpose of the changes in this file is to just
Gang Wu 2016/10/20 21:35:36 Done.
+ kModelType, &preferences_emitter_, state, std::move(cryptographer_copy),
+ &mock_nudge_handler_, std::move(processor)));
}
// Introduce a new key that the local cryptographer can't decrypt.
@@ -456,6 +458,10 @@ class ModelTypeWorkerTest : public ::testing::Test {
MockNudgeHandler mock_nudge_handler_;
bool is_processor_disconnected_;
+
+ base::ObserverList<TypeDebugInfoObserver> type_observers_;
+
+ NonBlockingTypeDebugInfoEmitter preferences_emitter_;
};
// Requests a commit and verifies the messages sent to the client and server as

Powered by Google App Engine
This is Rietveld 408576698