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

Unified Diff: chrome/browser/instant/instant_service_factory.cc

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/instant/instant_service_factory.cc
diff --git a/chrome/browser/instant/instant_service_factory.cc b/chrome/browser/instant/instant_service_factory.cc
index f24cdf582187ad4faecca1f73b4856cda4392735..bea3e6d37ca71fe4be61ddb55710b9554b180768 100644
--- a/chrome/browser/instant/instant_service_factory.cc
+++ b/chrome/browser/instant/instant_service_factory.cc
@@ -6,6 +6,8 @@
#include "chrome/browser/instant/instant_service.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/themes/theme_service_factory.h"
// static
InstantService* InstantServiceFactory::GetForProfile(Profile* profile) {
@@ -21,7 +23,8 @@ InstantServiceFactory* InstantServiceFactory::GetInstance() {
InstantServiceFactory::InstantServiceFactory()
: ProfileKeyedServiceFactory("InstantService",
ProfileDependencyManager::GetInstance()) {
- // No dependencies.
+ DependsOn(TemplateURLServiceFactory::GetInstance());
+ DependsOn(ThemeServiceFactory::GetInstance());
}
InstantServiceFactory::~InstantServiceFactory() {
@@ -33,5 +36,5 @@ bool InstantServiceFactory::ServiceRedirectedInIncognito() const {
ProfileKeyedService* InstantServiceFactory::BuildServiceInstanceFor(
Profile* profile) const {
- return new InstantService;
+ return new InstantService(profile);
}

Powered by Google App Engine
This is Rietveld 408576698