Commit a576d5a6 authored by rlp@chromium.org's avatar rlp@chromium.org

Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS.

BUG=112525
TEST=unittests, manual

TBR=sky@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10843018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149535 0039d316-1c4b-4281-b951-d872f2087c98
parent fa50dea0
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/stringprintf.h" #include "base/stringprintf.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/bookmark_service.h" #include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/history/android/android_time.h" #include "chrome/browser/history/android/android_time.h"
#include "chrome/browser/history/history_backend.h" #include "chrome/browser/history/history_backend.h"
...@@ -131,7 +132,7 @@ class AndroidProviderBackendTest : public testing::Test { ...@@ -131,7 +132,7 @@ class AndroidProviderBackendTest : public testing::Test {
// how the BookmarkModelSQLHandler gets the BookmarkModel. // how the BookmarkModelSQLHandler gets the BookmarkModel.
Profile* profile = ProfileManager::GetLastUsedProfile(); Profile* profile = ProfileManager::GetLastUsedProfile();
ASSERT_TRUE(profile); ASSERT_TRUE(profile);
bookmark_model_ = profile->GetBookmarkModel(); bookmark_model_ = BookmarkModelFactory::GetForProfile(profile);
ASSERT_TRUE(bookmark_model_); ASSERT_TRUE(bookmark_model_);
// Setup the database directory and files. // Setup the database directory and files.
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/bookmark_service.h" #include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/history/url_database.h" #include "chrome/browser/history/url_database.h"
...@@ -84,7 +85,7 @@ BookmarkModel* BookmarkModelSQLHandler::Task::GetBookmarkModel() { ...@@ -84,7 +85,7 @@ BookmarkModel* BookmarkModelSQLHandler::Task::GetBookmarkModel() {
Profile* profile = ProfileManager::GetLastUsedProfile(); Profile* profile = ProfileManager::GetLastUsedProfile();
if (!profile) if (!profile)
return NULL; return NULL;
return profile->GetBookmarkModel(); return BookmarkModelFactory::GetForProfile(profile);
} }
BookmarkModelSQLHandler::BookmarkModelSQLHandler( BookmarkModelSQLHandler::BookmarkModelSQLHandler(
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/history/history_database.h" #include "chrome/browser/history/history_database.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
...@@ -50,7 +51,7 @@ class BookmarkModelSQLHandlerTest : public testing::Test { ...@@ -50,7 +51,7 @@ class BookmarkModelSQLHandlerTest : public testing::Test {
// how the BookmarkModelSQLHandler gets the BookmarkModel. // how the BookmarkModelSQLHandler gets the BookmarkModel.
Profile* profile = ProfileManager::GetLastUsedProfile(); Profile* profile = ProfileManager::GetLastUsedProfile();
ASSERT_TRUE(profile); ASSERT_TRUE(profile);
bookmark_model_ = profile->GetBookmarkModel(); bookmark_model_ = BookmarkModelFactory::GetForProfile(profile);
ASSERT_TRUE(bookmark_model_); ASSERT_TRUE(bookmark_model_);
// Create the directory for history database. // Create the directory for history database.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment