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

Unified Diff: chrome/browser/profiles/profile_keyed_service_factory.h

Issue 6879031: Add optional creation to ProfileKeyedServiceFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add docs for new parameter Created 9 years, 8 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/profiles/profile_keyed_service_factory.h
diff --git a/chrome/browser/profiles/profile_keyed_service_factory.h b/chrome/browser/profiles/profile_keyed_service_factory.h
index 81262077dded72abeb44fdd3e2a37998ace70522..cc9c3bd04c176c8b89b5893f3393880dc1cf1e08 100644
--- a/chrome/browser/profiles/profile_keyed_service_factory.h
+++ b/chrome/browser/profiles/profile_keyed_service_factory.h
@@ -53,8 +53,9 @@ class ProfileKeyedServiceFactory {
// Common implementation that maps |profile| to some service object. Deals
// with incognito profiles per subclass instructions with
- // ServiceActiveInIncognito().
- ProfileKeyedService* GetServiceForProfile(Profile* profile);
+ // ServiceActiveInIncognito(). If |create| is true, the service will be
+ // created using BuildServiceInstanceFor() if it doesn't already exist.
+ ProfileKeyedService* GetServiceForProfile(Profile* profile, bool create);
// The main public interface for declaring dependencies between services
// created by factories.

Powered by Google App Engine
This is Rietveld 408576698