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

Unified Diff: content/child/process_control_impl.cc

Issue 1743473002: Change Mojo URLs to structured names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@18collapse
Patch Set: . Created 4 years, 10 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: content/child/process_control_impl.cc
diff --git a/content/child/process_control_impl.cc b/content/child/process_control_impl.cc
index 6cf00e5431953c4c06175cdd8cbf716671e0b7bb..7f953500e1b21c5c67ef6fe7fe5f143b4f5791db 100644
--- a/content/child/process_control_impl.cc
+++ b/content/child/process_control_impl.cc
@@ -9,7 +9,6 @@
#include "base/stl_util.h"
#include "content/common/mojo/static_application_loader.h"
#include "content/public/common/content_client.h"
-#include "url/gurl.h"
namespace content {
@@ -17,30 +16,29 @@ ProcessControlImpl::ProcessControlImpl() {
}
ProcessControlImpl::~ProcessControlImpl() {
- STLDeleteValues(&url_to_loader_map_);
+ STLDeleteValues(&name_to_loader_map_);
}
void ProcessControlImpl::LoadApplication(
- const mojo::String& url,
+ const mojo::String& name,
mojo::InterfaceRequest<mojo::shell::mojom::ShellClient> request,
const LoadApplicationCallback& callback) {
// Only register loaders when we need it.
if (!has_registered_loaders_) {
- DCHECK(url_to_loader_map_.empty());
- RegisterApplicationLoaders(&url_to_loader_map_);
+ DCHECK(name_to_loader_map_.empty());
+ RegisterApplicationLoaders(&name_to_loader_map_);
has_registered_loaders_ = true;
}
- GURL application_url = GURL(url.To<std::string>());
- auto it = url_to_loader_map_.find(application_url);
- if (it == url_to_loader_map_.end()) {
+ auto it = name_to_loader_map_.find(name);
+ if (it == name_to_loader_map_.end()) {
callback.Run(false);
OnLoadFailed();
return;
}
callback.Run(true);
- it->second->Load(application_url, std::move(request));
+ it->second->Load(name, std::move(request));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698