| 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();
|
| }
|
|
|