Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: chrome/browser/search_engines/search_provider_install_data.cc

Issue 376413002: Stop using TemplateURLServiceTestUtil to initialize TemplateURLServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TemplateURLServiceWithoutFallbackTest Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/search_provider_install_data.cc
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index 69920d263b81efccbae312b222bd407780842ba4..836b13d5dab9922c1581bfbbf75818a05f475b50 100644
--- a/chrome/browser/search_engines/search_provider_install_data.cc
+++ b/chrome/browser/search_engines/search_provider_install_data.cc
@@ -14,11 +14,9 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
-#include "chrome/browser/google/google_url_tracker_factory.h"
-#include "chrome/browser/search_engines/template_url_service_factory.h"
-#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/search_engines/search_host_to_urls_map.h"
+#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/util.h"
@@ -181,14 +179,14 @@ static bool IsSameOrigin(const GURL& requested_origin,
} // namespace
SearchProviderInstallData::SearchProviderInstallData(
- Profile* profile,
+ TemplateURLService* template_url_service,
+ const std::string& google_base_url,
+ GoogleURLTracker* google_url_tracker,
content::RenderProcessHost* host)
- : template_url_service_(TemplateURLServiceFactory::GetForProfile(profile)),
- google_base_url_(UIThreadSearchTermsData(profile).GoogleBaseURLValue()),
+ : template_url_service_(template_url_service),
+ google_base_url_(google_base_url),
weak_factory_(this) {
// GoogleURLTracker is not created in tests.
- GoogleURLTracker* google_url_tracker =
- GoogleURLTrackerFactory::GetForProfile(profile);
if (google_url_tracker) {
// GoogleURLObserver is responsible for killing itself when
// the given notification occurs.

Powered by Google App Engine
This is Rietveld 408576698