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

Unified Diff: mojo/shell/context.cc

Issue 696563002: Cache ShellImpl by resolved URL, not initial URL (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase Created 6 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 | « mojo/shell/context.h ('k') | mojo/shell/dynamic_application_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 62ff819e7fc868ace3b1507b00d9dbbce8aaceff..c4a76f1524c6e00831465e33270aa4f9fdb9213e 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -159,7 +159,7 @@ class Context::NativeViewportApplicationLoader
};
#endif
-Context::Context() {
+Context::Context() : application_manager_(this) {
DCHECK(!base::MessageLoop::current());
}
@@ -168,7 +168,6 @@ Context::~Context() {
}
void Context::Init() {
- application_manager_.set_delegate(this);
setup.Get();
task_runners_.reset(
new TaskRunners(base::MessageLoop::current()->message_loop_proxy()));
@@ -242,14 +241,18 @@ void Context::Init() {
listener_->WaitForListening();
}
-void Context::OnApplicationError(const GURL& gurl) {
- if (app_urls_.find(gurl) != app_urls_.end()) {
- app_urls_.erase(gurl);
+void Context::OnApplicationError(const GURL& url) {
+ if (app_urls_.find(url) != app_urls_.end()) {
+ app_urls_.erase(url);
if (app_urls_.empty() && base::MessageLoop::current()->is_running())
base::MessageLoop::current()->Quit();
}
}
+GURL Context::ResolveURL(const GURL& url) {
+ return mojo_url_resolver_.Resolve(url);
+}
+
void Context::Run(const GURL& url) {
EmptyServiceProvider* sp = new EmptyServiceProvider;
ServiceProviderPtr spp;
« no previous file with comments | « mojo/shell/context.h ('k') | mojo/shell/dynamic_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698