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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing debug lines. 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
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 943b927e2c7b13d187010018dfd507a7fce8f391..5f2ab27c18ca21866a206fa996ad9281cfdb43c8 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -114,6 +114,7 @@
#endif
#if defined(OS_ANDROID)
+#include "chrome/browser/android/offline_pages/offline_page_bookmark_observer.h"
#include "chrome/browser/signin/oauth2_token_service_delegate_android.h"
#endif
@@ -217,9 +218,16 @@ std::unique_ptr<KeyedService> BuildInMemoryURLIndex(
std::unique_ptr<KeyedService> BuildBookmarkModel(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
- std::unique_ptr<BookmarkModel> bookmark_model(
- new BookmarkModel(base::WrapUnique(new ChromeBookmarkClient(
- profile, ManagedBookmarkServiceFactory::GetForProfile(profile)))));
+ std::unique_ptr<bookmarks::BookmarkModelObserver> offline_page_observer =
+ nullptr;
+#if defined(OS_ANDROID)
+ offline_page_observer =
+ base::MakeUnique<offline_pages::OfflinePageBookmarkObserver>(profile);
+#endif
+ std::unique_ptr<BookmarkModel> bookmark_model(new BookmarkModel(
+ base::WrapUnique(new ChromeBookmarkClient(
Dmitry Titov 2016/08/26 23:08:59 Since you touch this code, the style guide now say
romax 2016/08/29 22:58:02 Done.
+ profile, ManagedBookmarkServiceFactory::GetForProfile(profile))),
+ std::move(offline_page_observer)));
bookmark_model->Load(profile->GetPrefs(), profile->GetPath(),
profile->GetIOTaskRunner(),
content::BrowserThread::GetTaskRunnerForThread(

Powered by Google App Engine
This is Rietveld 408576698