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

Unified Diff: shell/application_manager/application_manager.h

Issue 1444433002: Added anti-singleton services (new process/thread per connection). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added multiprocess apptest Created 5 years, 1 month 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 | « services/nacl/README.md ('k') | shell/application_manager/application_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager.h
diff --git a/shell/application_manager/application_manager.h b/shell/application_manager/application_manager.h
index 0a5e8b08d146b88f4793e79fdfcb9b2189971ff2..3be49926057b2a9250d979ba1e6b716fa92279fd 100644
--- a/shell/application_manager/application_manager.h
+++ b/shell/application_manager/application_manager.h
@@ -146,8 +146,8 @@ class ApplicationManager {
using SchemeToLoaderMap =
std::map<std::string, scoped_ptr<ApplicationLoader>>;
using IdentityToShellImplMap = std::map<Identity, scoped_ptr<ShellImpl>>;
- using URLToContentHandlerMap =
- std::map<GURL, scoped_ptr<ContentHandlerConnection>>;
+ using IdentityToContentHandlerMap =
+ std::map<Identity, scoped_ptr<ContentHandlerConnection>>;
using URLToArgsMap = std::map<GURL, std::vector<std::string>>;
using MimeTypeToURLMap = std::map<std::string, GURL>;
using URLToNativeOptionsMap = std::map<GURL, NativeApplicationOptions>;
@@ -175,6 +175,12 @@ class ApplicationManager {
const std::vector<std::string>& parameters,
ApplicationLoader* loader);
+ // Creates an Identity for the service identified by |resolved_url|.
+ // If |new_process_per_connection| is true for the URL's options, then the
+ // identity is unique. Otherwise, repeated invocations with the same
+ // |resolved_url| will result in an equivalent Identity.
+ Identity MakeApplicationIdentity(const GURL& resolved_url);
+
mojo::InterfaceRequest<mojo::Application> RegisterShell(
// The URL after resolution and redirects, including the querystring.
const GURL& resolved_url,
@@ -234,7 +240,7 @@ class ApplicationManager {
scoped_ptr<NativeRunnerFactory> native_runner_factory_;
IdentityToShellImplMap identity_to_shell_impl_;
- URLToContentHandlerMap url_to_content_handler_;
+ IdentityToContentHandlerMap identity_to_content_handler_;
URLToArgsMap url_to_args_;
// Note: The keys are URLs after mapping and resolving.
URLToNativeOptionsMap url_to_native_options_;
« no previous file with comments | « services/nacl/README.md ('k') | shell/application_manager/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698