X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fsearch_engines%2Ftemplate_url_service_test_util.cc;h=1d3748c1fde0733719ab108207133ee221274c47;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=dd328a0083d8b1c7a5e6786183fc354d7da0aa3a;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/search_engines/template_url_service_test_util.cc b/src/chrome/browser/search_engines/template_url_service_test_util.cc index dd328a0..1d3748c 100644 --- a/src/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/src/chrome/browser/search_engines/template_url_service_test_util.cc @@ -6,6 +6,7 @@ #include "base/message_loop/message_loop_proxy.h" #include "base/run_loop.h" +#include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/search_engines/chrome_template_url_service_client.h" #include "chrome/test/base/testing_pref_service_syncable.h" #include "chrome/test/base/testing_profile.h" @@ -21,15 +22,14 @@ namespace { class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { public: - TestingTemplateURLServiceClient(Profile* profile, + TestingTemplateURLServiceClient(HistoryService* history_service, base::string16* search_term) - : ChromeTemplateURLServiceClient(profile), + : ChromeTemplateURLServiceClient(history_service), search_term_(search_term) {} - virtual void SetKeywordSearchTermsForURL( - const GURL& url, - TemplateURLID id, - const base::string16& term) OVERRIDE { + void SetKeywordSearchTermsForURL(const GURL& url, + TemplateURLID id, + const base::string16& term) override { *search_term_ = term; } @@ -115,7 +115,10 @@ void TemplateURLServiceTestUtil::ResetModel(bool verify_load) { profile()->GetPrefs(), scoped_ptr(search_terms_data_), web_data_service_.get(), scoped_ptr( - new TestingTemplateURLServiceClient(profile(), &search_term_)), + new TestingTemplateURLServiceClient( + HistoryServiceFactory::GetForProfileIfExists( + profile(), Profile::EXPLICIT_ACCESS), + &search_term_)), NULL, NULL, base::Closure())); model()->AddObserver(this); changed_count_ = 0;