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

Unified Diff: chrome/browser/sync/test/integration/bookmarks_helper.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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
« no previous file with comments | « chrome/browser/sync/chrome_sync_client.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/bookmarks_helper.cc
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index 0e2549032ff99f7e657485f62c095f2f4416cb51..55ce806618f04c8be1312654817cadc0d87e59e5 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -255,15 +255,15 @@ void SetFaviconImpl(Profile* profile,
const GURL& icon_url,
const gfx::Image& image,
bookmarks_helper::FaviconSource favicon_source) {
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile);
- FaviconChangeObserver observer(model, node);
- favicon::FaviconService* favicon_service =
- FaviconServiceFactory::GetForProfile(
- profile, ServiceAccessType::EXPLICIT_ACCESS);
- if (favicon_source == bookmarks_helper::FROM_UI) {
- favicon_service->SetFavicons(
- node->url(), icon_url, favicon_base::FAVICON, image);
+ FaviconChangeObserver observer(model, node);
+ favicon::FaviconService* favicon_service =
+ FaviconServiceFactory::GetForProfile(profile,
+ ServiceAccessType::EXPLICIT_ACCESS);
+ if (favicon_source == bookmarks_helper::FROM_UI) {
+ favicon_service->SetFavicons(node->url(), icon_url, favicon_base::FAVICON,
+ image);
} else {
ProfileSyncService* pss =
ProfileSyncServiceFactory::GetForProfile(profile);
@@ -454,7 +454,7 @@ void FindNodeInVerifier(BookmarkModel* foreign_model,
namespace bookmarks_helper {
BookmarkModel* GetBookmarkModel(int index) {
- return BookmarkModelFactory::GetForProfile(
+ return BookmarkModelFactory::GetForBrowserContext(
sync_datatype_helper::test()->GetProfile(index));
}
@@ -477,7 +477,7 @@ const BookmarkNode* GetManagedNode(int index) {
}
BookmarkModel* GetVerifierBookmarkModel() {
- return BookmarkModelFactory::GetForProfile(
+ return BookmarkModelFactory::GetForBrowserContext(
sync_datatype_helper::test()->verifier());
}
« no previous file with comments | « chrome/browser/sync/chrome_sync_client.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698