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

Unified Diff: mojo/service_manager/service_manager.h

Issue 214513009: Change ServiceManager::SetLoaderForUrl() to SetLoaderForScheme() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Leave GetLoaderForURL() as is Created 6 years, 9 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
« no previous file with comments | « no previous file | mojo/service_manager/service_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/service_manager/service_manager.h
diff --git a/mojo/service_manager/service_manager.h b/mojo/service_manager/service_manager.h
index cf4c3854b698e58023223adaa8819bddb6fa5b13..ea8fb5c727ab6e62c846d0fc2292050158437d57 100644
--- a/mojo/service_manager/service_manager.h
+++ b/mojo/service_manager/service_manager.h
@@ -45,12 +45,13 @@ class MOJO_SERVICE_MANAGER_EXPORT ServiceManager {
// Returns a shared instance, creating it if necessary.
static ServiceManager* GetInstance();
- // Sets the default Loader to be used if not overridden by SetLoaderForURL().
+ // Sets the default Loader to be used if not overridden by
+ // SetLoaderForScheme().
// Does not take ownership of |loader|.
void set_default_loader(ServiceLoader* loader) { default_loader_ = loader; }
- // Sets a Loader to be used for a specific url.
+ // Sets a Loader to be used for a specific scheme.
darin (slow to review) 2014/03/27 23:33:41 nit: you probably want to say "URL scheme" in the
// Does not take ownership of |loader|.
- void SetLoaderForURL(ServiceLoader* loader, const GURL& gurl);
+ void SetLoaderForScheme(ServiceLoader* loader, const std::string& scheme);
// Returns the Loader to use for a url (using default if not overridden.)
ServiceLoader* GetLoaderForURL(const GURL& gurl);
// Loads a service if necessary and establishes a new client connection.
@@ -65,8 +66,8 @@ class MOJO_SERVICE_MANAGER_EXPORT ServiceManager {
ServiceLoader* default_loader_;
typedef std::map<GURL, ServiceFactory*> ServiceFactoryMap;
ServiceFactoryMap url_to_service_factory_;
- typedef std::map<GURL, ServiceLoader*> LoaderMap;
- LoaderMap url_to_loader_;
+ typedef std::map<std::string, ServiceLoader*> LoaderMap;
+ LoaderMap scheme_to_loader_;
DISALLOW_COPY_AND_ASSIGN(ServiceManager);
};
« no previous file with comments | « no previous file | mojo/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698