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

Unified Diff: chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc

Issue 1233673002: Fix componentization of chrome/browser/bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix "gn check" and compilation on Mac Created 5 years, 5 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: chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
index c13d4e2b3fbfb2eb15190d377dbaa32d6934c7d8..445e482bce00006be6bb83cffec7f0d1e80a37f7 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/chrome_bookmark_client.h"
#include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h"
+#include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
@@ -55,12 +56,6 @@ class HistoryMock : public history::HistoryService {
~HistoryMock() override {}
};
-scoped_ptr<KeyedService> BuildChromeBookmarkClient(
- content::BrowserContext* context) {
- return make_scoped_ptr(
- new ChromeBookmarkClient(static_cast<Profile*>(context)));
-}
-
scoped_ptr<KeyedService> BuildBookmarkModelWithoutLoading(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
@@ -114,8 +109,10 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
};
void CreateBookmarkModel(BookmarkLoadPolicy bookmark_load_policy) {
+ ManagedBookmarkServiceFactory::GetInstance()->SetTestingFactory(
+ &profile_, ManagedBookmarkServiceFactory::GetDefaultFactory());
ChromeBookmarkClientFactory::GetInstance()->SetTestingFactory(
- &profile_, BuildChromeBookmarkClient);
+ &profile_, ChromeBookmarkClientFactory::GetDefaultFactory());
if (bookmark_load_policy == LOAD_MODEL) {
bookmark_model_ = static_cast<BookmarkModel*>(
BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse(
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmarks_api.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698