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

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: Rebase + fix typo Created 7 years 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 | « sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc ('k') | sync/engine/get_commit_ids.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/download_unittest.cc
diff --git a/sync/engine/download_unittest.cc b/sync/engine/download_unittest.cc
index 9336893eea758337e983e98b6a5f45d6a00161f8..8fd08d157a99589304f41e2eb5ac0f8a89558ae1 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 "sync/test/sessions/mock_debug_info_getter.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,9 +32,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() {
@@ -58,11 +59,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.
« no previous file with comments | « sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc ('k') | sync/engine/get_commit_ids.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698