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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 660813002: [Win] Add a fast profile switcher to the Windows taskbar item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 6 years, 1 month 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
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 381f26533567411023af064022ddddb521e9decb..7eebb2000c48aa122135a317b398d51dea2a1490 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -746,6 +746,19 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}
+ // 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)) {
sky 2014/11/10 23:28:25 How do you know there isn't anything else interest
noms (inactive) 2014/11/12 19:04:11 This was originally in ProcessCmdLineImpl, but tap
+ Browser* browser = chrome::FindTabbedBrowser(
+ profile, false, chrome::HOST_DESKTOP_TYPE_NATIVE);
+ if (browser) {
+ browser->window()->Activate();
+ return;
+ }
+ }
+
ProcessCmdLineImpl(command_line, cur_dir, false, profile, Profiles(), NULL,
NULL);
}

Powered by Google App Engine
This is Rietveld 408576698