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

Unified Diff: chrome/browser/bookmarks/bookmark_model_factory.cc

Issue 305973004: BookmarkClient can add extra nodes to BookmarkModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed methods Created 6 years, 6 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/bookmarks/bookmark_model_factory.cc
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc
index 6000d8039cce6a00fe5f529ecda03d5fff10bf9c..9c6757f11a9f853bcea1f4baa7539f5cf0bea2a4 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.cc
+++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -27,11 +27,12 @@
// static
BookmarkModel* BookmarkModelFactory::GetForProfile(Profile* profile) {
- ChromeBookmarkClient* bookmark_client = static_cast<ChromeBookmarkClient*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
+ ChromeBookmarkClient* bookmark_client =
+ GetChromeBookmarkClientForProfile(profile);
return bookmark_client ? bookmark_client->model() : NULL;
}
+// static
BookmarkModel* BookmarkModelFactory::GetForProfileIfExists(Profile* profile) {
ChromeBookmarkClient* bookmark_client = static_cast<ChromeBookmarkClient*>(
GetInstance()->GetServiceForBrowserContext(profile, false));
@@ -39,6 +40,13 @@ BookmarkModel* BookmarkModelFactory::GetForProfileIfExists(Profile* profile) {
}
// static
+ChromeBookmarkClient* BookmarkModelFactory::GetChromeBookmarkClientForProfile(
+ Profile* profile) {
+ return static_cast<ChromeBookmarkClient*>(
+ GetInstance()->GetServiceForBrowserContext(profile, true));
+}
+
+// static
BookmarkModelFactory* BookmarkModelFactory::GetInstance() {
return Singleton<BookmarkModelFactory>::get();
}
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_factory.h ('k') | chrome/browser/bookmarks/chrome_bookmark_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698