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

Unified Diff: sync/engine/download_unittest.cc

Issue 72403003: sync: Per-type update application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 7 years, 1 month 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: sync/engine/download_unittest.cc
diff --git a/sync/engine/download_unittest.cc b/sync/engine/download_unittest.cc
index f38ab2b4c1397ea277ac0347555defdf9d00a82c..914c90380b3988f5d4dbd12b12e097109ae446e0 100644
--- a/sync/engine/download_unittest.cc
+++ b/sync/engine/download_unittest.cc
@@ -13,6 +13,7 @@
#include "sync/sessions/nudge_tracker.h"
#include "sync/sessions/status_controller.h"
#include "sync/syncable/directory.h"
+#include "sync/test/engine/fake_model_worker.h"
#include "sync/test/engine/test_directory_setter_upper.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,9 +29,9 @@ class DownloadUpdatesTest : public ::testing::Test {
virtual void SetUp() {
dir_maker_.SetUp();
- AddUpdateHandler(AUTOFILL);
- AddUpdateHandler(BOOKMARKS);
- AddUpdateHandler(PREFERENCES);
+ AddUpdateHandler(AUTOFILL, GROUP_DB);
+ AddUpdateHandler(BOOKMARKS, GROUP_UI);
+ AddUpdateHandler(PREFERENCES, GROUP_UI);
}
virtual void TearDown() {
@@ -55,11 +56,12 @@ class DownloadUpdatesTest : public ::testing::Test {
}
private:
- void AddUpdateHandler(ModelType type) {
+ void AddUpdateHandler(ModelType type, ModelSafeGroup group) {
DCHECK(directory());
- update_handler_map_.insert(
- std::make_pair(type,
- new SyncDirectoryUpdateHandler(directory(), type)));
+ scoped_refptr<ModelSafeWorker> worker = new FakeModelWorker(group);
+ SyncDirectoryUpdateHandler* handler =
+ new SyncDirectoryUpdateHandler(directory(), type, worker);
+ update_handler_map_.insert(std::make_pair(type, handler));
}
base::MessageLoop loop_; // Needed for directory init.

Powered by Google App Engine
This is Rietveld 408576698