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

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: cleanup Created 6 years, 2 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: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index d7f8e30d5428a96063bd775e4b8572b6589b9fdd..fb9f9603313432f409e0ce32a440befd439278fd 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_(NULL) {
qsr 2014/10/31 12:22:15 s/NULL/this/ ?
Aaron Boodman 2014/10/31 18:14:02 Thanks, I went back and forth on how to do this an
DCHECK(!base::MessageLoop::current());
}
@@ -242,14 +242,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;

Powered by Google App Engine
This is Rietveld 408576698