| Index: chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
|
| diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
|
| index 73babc4d99342c109231b4ec97e8977dfe394464..868c9010524637fa90f124c367fd01bfc625915b 100644
|
| --- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
|
| +++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
|
| @@ -56,14 +56,19 @@ class HistoryMock : public HistoryService {
|
|
|
| KeyedService* BuildBookmarkModel(content::BrowserContext* context) {
|
| Profile* profile = static_cast<Profile*>(context);
|
| - BookmarkModel* bookmark_model = new BookmarkModel(profile);
|
| - bookmark_model->Load(profile->GetIOTaskRunner());
|
| - return bookmark_model;
|
| + ChromeBookmarkClient* bookmark_client = new ChromeBookmarkClient(profile);
|
| + bookmark_client->model()->Load(
|
| + profile->GetPrefs(),
|
| + profile->GetPath(),
|
| + profile->GetIOTaskRunner(),
|
| + content::BrowserThread::GetMessageLoopProxyForThread(
|
| + content::BrowserThread::UI));
|
| + return bookmark_client;
|
| }
|
|
|
| KeyedService* BuildBookmarkModelWithoutLoading(
|
| content::BrowserContext* profile) {
|
| - return new BookmarkModel(static_cast<Profile*>(profile));
|
| + return new ChromeBookmarkClient(static_cast<Profile*>(profile));
|
| }
|
|
|
| KeyedService* BuildHistoryService(content::BrowserContext* profile) {
|
| @@ -100,14 +105,14 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
|
|
|
| void CreateBookmarkModel(BookmarkLoadPolicy bookmark_load_policy) {
|
| if (bookmark_load_policy == LOAD_MODEL) {
|
| - bookmark_model_ = static_cast<BookmarkModel*>(
|
| + bookmark_model_ = static_cast<ChromeBookmarkClient*>(
|
| BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse(
|
| - &profile_, BuildBookmarkModel));
|
| + &profile_, BuildBookmarkModel))->model();
|
| test::WaitForBookmarkModelToLoad(bookmark_model_);
|
| } else {
|
| - bookmark_model_ = static_cast<BookmarkModel*>(
|
| + bookmark_model_ = static_cast<ChromeBookmarkClient*>(
|
| BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse(
|
| - &profile_, BuildBookmarkModelWithoutLoading));
|
| + &profile_, BuildBookmarkModelWithoutLoading))->model();
|
| }
|
| }
|
|
|
| @@ -180,7 +185,11 @@ TEST_F(SyncBookmarkDataTypeControllerTest, StartBookmarkModelNotReady) {
|
| base::Unretained(&model_load_callback_)));
|
| EXPECT_EQ(DataTypeController::MODEL_STARTING, bookmark_dtc_->state());
|
|
|
| - bookmark_model_->Load(profile_.GetIOTaskRunner());
|
| + bookmark_model_->Load(profile_.GetPrefs(),
|
| + profile_.GetPath(),
|
| + profile_.GetIOTaskRunner(),
|
| + content::BrowserThread::GetMessageLoopProxyForThread(
|
| + content::BrowserThread::UI));
|
| test::WaitForBookmarkModelToLoad(bookmark_model_);
|
| EXPECT_EQ(DataTypeController::MODEL_LOADED, bookmark_dtc_->state());
|
|
|
|
|