Chromium Code Reviews| Index: chrome/test/base/testing_profile.cc |
| diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
| index e3de282a58aaacee7e01e4e97bd84cf1c71171f3..7fa318234a02b1cf08da20553279d5cabb8a3aeb 100644 |
| --- a/chrome/test/base/testing_profile.cc |
| +++ b/chrome/test/base/testing_profile.cc |
| @@ -27,7 +27,8 @@ |
| #include "chrome/browser/history/history_db_task.h" |
| #include "chrome/browser/history/history_service.h" |
| #include "chrome/browser/history/history_service_factory.h" |
| -#include "chrome/browser/history/top_sites.h" |
| +#include "chrome/browser/history/top_sites_provider.h" |
| +#include "chrome/browser/history/top_sites_service_factory.h" |
| #include "chrome/browser/history/web_history_service_factory.h" |
| #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| #include "chrome/browser/net/proxy_service_factory.h" |
| @@ -116,10 +117,10 @@ class WaitTopSitesLoadedObserver : public history::TopSitesObserver { |
| public: |
| explicit WaitTopSitesLoadedObserver(content::MessageLoopRunner* runner) |
| : runner_(runner) {} |
| - void TopSitesLoaded(history::TopSites* top_sites) override { |
| + void TopSitesLoaded(history::TopSitesProvider* top_sites) override { |
| runner_->Quit(); |
| } |
| - void TopSitesChanged(history::TopSites* top_sites) override {} |
| + void TopSitesChanged(history::TopSitesProvider* top_sites) override {} |
| private: |
| // weak |
| @@ -223,9 +224,9 @@ KeyedService* BuildChromeBookmarkClient( |
| KeyedService* BuildChromeHistoryClient( |
| content::BrowserContext* context) { |
| Profile* profile = static_cast<Profile*>(context); |
| - return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile), |
| - profile, |
| - profile->GetTopSites()); |
| + return new ChromeHistoryClient( |
| + BookmarkModelFactory::GetForProfile(profile), profile, |
| + TopSitesServiceFactory::GetForProfile(profile)); |
| } |
| void TestProfileErrorCallback(WebDataServiceWrapper::ErrorType error_type, |
| @@ -571,11 +572,11 @@ void TestingProfile::DestroyHistoryService() { |
| void TestingProfile::CreateTopSites() { |
| DestroyTopSites(); |
| - top_sites_ = history::TopSites::Create( |
|
sdefresne
2014/12/19 15:11:42
Remove top_sites_ property from TestingProfile() a
Jitu( very slow this week)
2014/12/26 14:04:28
Done.
|
| + top_sites_ = history::TopSitesProvider::Create( |
| this, GetPath().Append(chrome::kTopSitesFilename)); |
| } |
| -void TestingProfile::SetTopSites(history::TopSites* top_sites) { |
|
sdefresne
2014/12/19 15:11:42
You'll have to remove this method and instead chan
Jitu( very slow this week)
2014/12/26 14:04:29
Done.
|
| +void TestingProfile::SetTopSites(history::TopSitesProvider* top_sites) { |
| DestroyTopSites(); |
| top_sites_ = top_sites; |
| } |
| @@ -794,11 +795,11 @@ PrefService* TestingProfile::GetPrefs() { |
| return prefs_.get(); |
| } |
| -history::TopSites* TestingProfile::GetTopSites() { |
|
sdefresne
2014/12/19 15:11:42
Remove.
Jitu( very slow this week)
2014/12/26 14:04:29
Done.
|
| +history::TopSitesProvider* TestingProfile::GetTopSites() { |
| return top_sites_.get(); |
| } |
| -history::TopSites* TestingProfile::GetTopSitesWithoutCreating() { |
|
sdefresne
2014/12/19 15:11:42
Remove.
Jitu( very slow this week)
2014/12/26 14:04:28
Done.
|
| +history::TopSitesProvider* TestingProfile::GetTopSitesWithoutCreating() { |
| return top_sites_.get(); |
| } |