| Index: shell/application_manager/application_manager.cc
|
| diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
|
| index 2cd3c9bf7716eb4686d4a595b880e2996e176775..e46b4e38e5fa1d855e00082391f56aeb6f9fe1c3 100644
|
| --- a/shell/application_manager/application_manager.cc
|
| +++ b/shell/application_manager/application_manager.cc
|
| @@ -186,15 +186,13 @@ void ApplicationManager::RegisterExternalApplication(
|
| const GURL& url,
|
| const std::vector<std::string>& args,
|
| ApplicationPtr application) {
|
| - const auto& args_it = url_to_args_.find(url);
|
| - if (args_it != url_to_args_.end()) {
|
| - LOG(WARNING) << "--args-for provided for external application "
|
| - << url
|
| - << " <ignored>";
|
| - }
|
| ShellImpl* shell_impl = new ShellImpl(application.Pass(), this, url, url);
|
| url_to_shell_impl_[url] = shell_impl;
|
| - shell_impl->InitializeApplication(Array<String>::From(args));
|
| +
|
| + if (args.empty())
|
| + shell_impl->InitializeApplication(GetArgsForURL(url));
|
| + else
|
| + shell_impl->InitializeApplication(Array<String>::From(args));
|
| }
|
|
|
| void ApplicationManager::LoadWithContentHandler(
|
| @@ -287,7 +285,7 @@ ScopedMessagePipeHandle ApplicationManager::ConnectToServiceByName(
|
| }
|
|
|
| Array<String> ApplicationManager::GetArgsForURL(const GURL& url) {
|
| - const auto& args_it = url_to_args_.find(url);
|
| + URLToArgsMap::const_iterator args_it = url_to_args_.find(url);
|
| if (args_it != url_to_args_.end())
|
| return Array<String>::From(args_it->second);
|
| return Array<String>();
|
|
|