Chromium Code Reviews| Index: chrome/browser/ui/startup/startup_browser_creator.cc |
| diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc |
| index a32608050b2677f21840a94941507ab76f41f1a9..b2b9880aaf81b4f7f4e90402a34475f37fe312a8 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator.cc |
| +++ b/chrome/browser/ui/startup/startup_browser_creator.cc |
| @@ -87,6 +87,10 @@ |
| #include "chrome/browser/web_applications/web_app_mac.h" |
| #endif |
| +#if defined(OS_WIN) |
| +#include "chrome/browser/metrics/jumplist_metrics_win.h" |
| +#endif |
| + |
| #if defined(ENABLE_PRINT_PREVIEW) |
| #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h" |
| @@ -627,6 +631,28 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( |
| return true; |
| } |
| + |
| +#if defined(OS_WIN) |
| + // Log whether this process was a result of an action in the Windows Jumplist. |
| + if (command_line.HasSwitch(switches::kWinJumplistAction)) { |
| + jumplist::LogJumplistActionFromSwitchValue( |
| + command_line.GetSwitchValueASCII(switches::kWinJumplistAction)); |
|
sky
2014/11/13 00:17:11
Should the command line switch get removed so that
noms (inactive)
2014/11/13 16:59:55
Ah. I found where to do it correctly -- there's a
|
| + } |
| +#endif |
| + |
| + // If the profile is loaded and the --activate-existing-profile-browser flag |
| + // is used, activate one of the profile's browser windows, if one exists. |
| + // Continuing to process the command line is not needed, since this will |
| + // end up opening a new browser window. |
| + if (command_line.HasSwitch(switches::kActivateExistingProfileBrowser)) { |
| + Browser* browser = chrome::FindTabbedBrowser( |
| + last_used_profile, false, chrome::HOST_DESKTOP_TYPE_NATIVE); |
| + if (browser) { |
| + browser->window()->Activate(); |
| + return true; |
| + } |
| + } |
| + |
| VLOG(2) << "ProcessCmdLineImpl: PLACE 5"; |
| chrome::startup::IsProcessStartup is_process_startup = process_startup ? |
| chrome::startup::IS_PROCESS_STARTUP : |