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

Unified Diff: shell/application_manager/application_manager.cc

Issue 1031833003: Fix parameters aggregation. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 9 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 | « shell/application_manager/application_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index f285962ee5cc1a4cd430a82e77150e889eccf894..c4ad8f42597a72180e1f5cbe7e49b54668c7a19d 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -132,7 +132,7 @@ void ApplicationManager::ConnectToApplicationWithParameters(
const GURL& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
- const std::vector<std::string>& parameters) {
+ const std::vector<std::string>& pre_redirect_parameters) {
DCHECK(requested_url.is_valid());
// We check both the mapped and resolved urls for existing shell_impls because
@@ -150,6 +150,10 @@ void ApplicationManager::ConnectToApplicationWithParameters(
return;
}
+ // The application is not running, let's compute the parameters.
+ std::vector<std::string> parameters =
+ Concatenate(pre_redirect_parameters, GetArgsForURL(resolved_url));
+
if (ConnectToApplicationWithLoader(requested_url, mapped_url, requestor_url,
&services, &exposed_services, parameters,
GetLoaderForURL(mapped_url))) {
@@ -168,11 +172,10 @@ void ApplicationManager::ConnectToApplicationWithParameters(
return;
}
- auto callback = base::Bind(
- &ApplicationManager::HandleFetchCallback, weak_ptr_factory_.GetWeakPtr(),
- requested_url, requestor_url, base::Passed(services.Pass()),
- base::Passed(exposed_services.Pass()),
- Concatenate(parameters, GetArgsForURL(resolved_url)));
+ auto callback = base::Bind(&ApplicationManager::HandleFetchCallback,
+ weak_ptr_factory_.GetWeakPtr(), requested_url,
+ requestor_url, base::Passed(services.Pass()),
+ base::Passed(exposed_services.Pass()), parameters);
if (resolved_url.SchemeIsFile()) {
new LocalFetcher(resolved_url, GetBaseURLAndQuery(resolved_url, nullptr),
@@ -240,8 +243,7 @@ InterfaceRequest<Application> ApplicationManager::RegisterShell(
ShellImpl* shell =
new ShellImpl(application.Pass(), this, original_url, app_identity);
identity_to_shell_impl_[app_identity] = shell;
- shell->InitializeApplication(Array<String>::From(
- Concatenate(parameters, GetArgsForURL(app_identity.url))));
+ shell->InitializeApplication(Array<String>::From(parameters));
ConnectToClient(shell, resolved_url, requestor_url, services.Pass(),
exposed_services.Pass());
return application_request.Pass();
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698