Index application by URL and identity for multiprocess.

This is a baby step in the direction of allowing to run multiple
instance of the same content handler. This will be needed when we enable
multi-process so that 2 application that use the same content handler
can be run in 2 processes.

R=davemoore@chromium.org

Review URL: https://codereview.chromium.org/979203002
diff --git a/shell/application_manager/application_manager.h b/shell/application_manager/application_manager.h
index 05a4fc9..8ae6eb9 100644
--- a/shell/application_manager/application_manager.h
+++ b/shell/application_manager/application_manager.h
@@ -16,6 +16,7 @@
 #include "mojo/public/interfaces/application/service_provider.mojom.h"
 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
 #include "shell/application_manager/application_loader.h"
+#include "shell/application_manager/identity.h"
 #include "shell/application_manager/native_runner.h"
 #include "url/gurl.h"
 
@@ -133,7 +134,7 @@
 
   typedef std::map<std::string, ApplicationLoader*> SchemeToLoaderMap;
   typedef std::map<GURL, ApplicationLoader*> URLToLoaderMap;
-  typedef std::map<GURL, ShellImpl*> URLToShellImplMap;
+  typedef std::map<Identity, ShellImpl*> IdentityToShellImplMap;
   typedef std::map<GURL, ContentHandlerConnection*> URLToContentHandlerMap;
   typedef std::map<GURL, std::vector<std::string>> URLToArgsMap;
   typedef std::map<std::string, GURL> MimeTypeToURLMap;
@@ -209,7 +210,7 @@
   scoped_ptr<ApplicationLoader> default_loader_;
   scoped_ptr<NativeRunnerFactory> native_runner_factory_;
 
-  URLToShellImplMap url_to_shell_impl_;
+  IdentityToShellImplMap identity_to_shell_impl_;
   URLToContentHandlerMap url_to_content_handler_;
   URLToArgsMap url_to_args_;
   // Note: The keys are URLs after mapping and resolving.