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

Unified Diff: mojo/shell/application_manager.cc

Issue 1143793003: Remove application-specific args from Mandoline's shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 7 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
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/shell/application_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager.cc
diff --git a/mojo/shell/application_manager.cc b/mojo/shell/application_manager.cc
index 2b08442a2d92efac7a72618737ed953281221741..84046d67daf23a1fa39f40d9e436152855e65559 100644
--- a/mojo/shell/application_manager.cc
+++ b/mojo/shell/application_manager.cc
@@ -41,9 +41,9 @@ class ApplicationManager::ContentHandlerConnection : public ErrorHandler {
content_handler_url_(content_handler_url),
content_handler_qualifier_(qualifier) {
ServiceProviderPtr services;
- manager->ConnectToApplicationWithParameters(
+ manager->ConnectToApplicationInternal(
content_handler_url, qualifier, requestor_url, GetProxy(&services),
- nullptr, base::Closure(), std::vector<std::string>());
+ nullptr, base::Closure());
MessagePipe pipe;
content_handler_.Bind(
InterfacePtrInfo<ContentHandler>(pipe.handle0.Pass(), 0u));
@@ -106,21 +106,20 @@ void ApplicationManager::ConnectToApplication(
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
const base::Closure& on_application_end) {
- ConnectToApplicationWithParameters(
+ ConnectToApplicationInternal(
requested_url, std::string(), requestor_url, services.Pass(),
- exposed_services.Pass(), on_application_end, std::vector<std::string>());
+ exposed_services.Pass(), on_application_end);
}
-void ApplicationManager::ConnectToApplicationWithParameters(
+void ApplicationManager::ConnectToApplicationInternal(
const GURL& requested_url,
const std::string& qualifier,
const GURL& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
- const base::Closure& on_application_end,
- const std::vector<std::string>& pre_redirect_parameters) {
+ const base::Closure& on_application_end) {
TRACE_EVENT_INSTANT1(
- "mojo_shell", "ApplicationManager::ConnectToApplicationWithParameters",
+ "mojo_shell", "ApplicationManager::ConnectToApplication",
TRACE_EVENT_SCOPE_THREAD, "requested_url", requested_url.spec());
DCHECK(requested_url.is_valid());
@@ -142,30 +141,27 @@ void ApplicationManager::ConnectToApplicationWithParameters(
// The application is not running, let's compute the parameters.
if (ConnectToApplicationWithLoader(
requested_url, qualifier, mapped_url, requestor_url, &services,
- &exposed_services, on_application_end, pre_redirect_parameters,
- GetLoaderForURL(mapped_url))) {
+ &exposed_services, on_application_end, GetLoaderForURL(mapped_url))) {
return;
}
if (ConnectToApplicationWithLoader(
requested_url, qualifier, resolved_url, requestor_url, &services,
- &exposed_services, on_application_end, pre_redirect_parameters,
+ &exposed_services, on_application_end,
GetLoaderForURL(resolved_url))) {
return;
}
if (ConnectToApplicationWithLoader(
requested_url, qualifier, resolved_url, requestor_url, &services,
- &exposed_services, on_application_end, pre_redirect_parameters,
- default_loader_.get())) {
+ &exposed_services, on_application_end, default_loader_.get())) {
return;
}
auto callback = base::Bind(
&ApplicationManager::HandleFetchCallback, weak_ptr_factory_.GetWeakPtr(),
requested_url, qualifier, requestor_url, base::Passed(services.Pass()),
- base::Passed(exposed_services.Pass()), on_application_end,
- pre_redirect_parameters);
+ base::Passed(exposed_services.Pass()), on_application_end);
if (delegate_->CreateFetcher(
resolved_url,
@@ -217,7 +213,6 @@ bool ApplicationManager::ConnectToApplicationWithLoader(
InterfaceRequest<ServiceProvider>* services,
ServiceProviderPtr* exposed_services,
const base::Closure& on_application_end,
- const std::vector<std::string>& parameters,
ApplicationLoader* loader) {
if (!loader)
return false;
@@ -228,7 +223,7 @@ bool ApplicationManager::ConnectToApplicationWithLoader(
loader->Load(
resolved_url,
RegisterShell(app_url, qualifier, requestor_url, services->Pass(),
- exposed_services->Pass(), on_application_end, parameters));
+ exposed_services->Pass(), on_application_end));
return true;
}
@@ -238,8 +233,7 @@ InterfaceRequest<Application> ApplicationManager::RegisterShell(
const GURL& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
- const base::Closure& on_application_end,
- const std::vector<std::string>& parameters) {
+ const base::Closure& on_application_end) {
Identity app_identity(app_url, qualifier);
ApplicationPtr application;
@@ -247,7 +241,7 @@ InterfaceRequest<Application> ApplicationManager::RegisterShell(
ShellImpl* shell =
new ShellImpl(application.Pass(), this, app_identity, on_application_end);
identity_to_shell_impl_[app_identity] = shell;
- shell->InitializeApplication(Array<String>::From(parameters));
+ shell->InitializeApplication();
ConnectToClient(shell, app_url, requestor_url, services.Pass(),
exposed_services.Pass());
return application_request.Pass();
@@ -278,7 +272,6 @@ void ApplicationManager::HandleFetchCallback(
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
const base::Closure& on_application_end,
- const std::vector<std::string>& parameters,
NativeApplicationCleanup cleanup,
scoped_ptr<Fetcher> fetcher) {
if (!fetcher) {
@@ -290,9 +283,9 @@ void ApplicationManager::HandleFetchCallback(
if (!redirect_url.is_empty()) {
// And around we go again... Whee!
// TODO(sky): this loses |requested_url|.
- ConnectToApplicationWithParameters(redirect_url, qualifier, requestor_url,
- services.Pass(), exposed_services.Pass(),
- on_application_end, parameters);
+ ConnectToApplicationInternal(redirect_url, qualifier, requestor_url,
+ services.Pass(), exposed_services.Pass(),
+ on_application_end);
return;
}
@@ -312,7 +305,7 @@ void ApplicationManager::HandleFetchCallback(
InterfaceRequest<Application> request(
RegisterShell(app_url, qualifier, requestor_url, services.Pass(),
- exposed_services.Pass(), on_application_end, parameters));
+ exposed_services.Pass(), on_application_end));
// If the response begins with a #!mojo <content-handler-url>, use it.
GURL content_handler_url;
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/shell/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698