Chromium Code Reviews| Index: shell/application_manager/application_manager.cc |
| diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc |
| index 4f4af48b18b238827e997972fe3d2195cb8c5a11..e38b5ee2fead6c6f83a0b3bda2cb235d1520bfe8 100644 |
| --- a/shell/application_manager/application_manager.cc |
| +++ b/shell/application_manager/application_manager.cc |
| @@ -31,6 +31,9 @@ namespace shell { |
| namespace { |
| +// Create identity that depends on the query. |
| +const bool kWithQuery = true; |
| + |
| // Used by TestAPI. |
| bool has_created_instance = false; |
| @@ -258,15 +261,17 @@ bool ApplicationManager::ConnectToApplicationWithLoader( |
| return true; |
| } |
| -Identity ApplicationManager::MakeApplicationIdentity(const GURL& resolved_url) { |
| +Identity ApplicationManager::MakeApplicationIdentity(const GURL& resolved_url, |
| + bool with_query) { |
|
ppi
2015/11/24 10:47:21
Why parametrize if we don't call it with |with_que
qsr
2015/11/24 12:24:32
We do, we have a default value for the parameter.
|
| static uint64_t unique_id_number = 1; |
| bool new_process_per_connection = |
| GetNativeApplicationOptionsForURL( |
| GetBaseURLAndQuery(resolved_url, nullptr)) |
| ->new_process_per_connection; |
| return new_process_per_connection |
| - ? Identity(resolved_url, base::Uint64ToString(unique_id_number++)) |
| - : Identity(resolved_url); |
| + ? Identity(resolved_url, base::Uint64ToString(unique_id_number++), |
| + with_query) |
| + : Identity(resolved_url, with_query); |
| } |
| InterfaceRequest<Application> ApplicationManager::RegisterShell( |
| @@ -429,7 +434,8 @@ void ApplicationManager::LoadWithContentHandler( |
| InterfaceRequest<Application> application_request, |
| mojo::URLResponsePtr url_response) { |
| ContentHandlerConnection* connection = nullptr; |
| - Identity content_handler_id = MakeApplicationIdentity(content_handler_url); |
| + Identity content_handler_id = |
| + MakeApplicationIdentity(content_handler_url, kWithQuery); |
| auto it = identity_to_content_handler_.find(content_handler_id); |
| if (it != identity_to_content_handler_.end()) { |
| connection = it->second.get(); |