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

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

Issue 10696093: Hide the main window when Set-As-Default dialog is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review remarks. Created 8 years, 4 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
Index: chrome/browser/ui/startup/default_browser_prompt_win.cc
diff --git a/chrome/browser/ui/startup/default_browser_prompt_win.cc b/chrome/browser/ui/startup/default_browser_prompt_win.cc
index 8739c46a0b9aae2ab04325672f676f58a801a6ce..8ad07a4d965a525c4db4ffa10a076bfab1971a41 100644
--- a/chrome/browser/ui/startup/default_browser_prompt_win.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt_win.cc
@@ -69,15 +69,20 @@ void SetMetroBrowserFlowLauncher::Observe(
namespace chrome {
-void ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
- if ((ShellIntegration::IsDefaultBrowser() ==
- ShellIntegration::NOT_DEFAULT_WEB_CLIENT) &&
+bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
+ // If the only available mode of setting the default browser requires
+ // user interaction, it means this couldn't have been done yet. Therefore,
+ // we launch the dialog and inform the caller of it.
+ bool show_status =
(ShellIntegration::CanSetAsDefaultBrowser() ==
- ShellIntegration::SET_DEFAULT_INTERACTIVE)) {
- // If the only available mode of setting the default browser requires
- // user interaction, it means this couldn't have been done yet.
+ ShellIntegration::SET_DEFAULT_INTERACTIVE) &&
+ (ShellIntegration::IsDefaultBrowser() ==
+ ShellIntegration::NOT_DEFAULT_WEB_CLIENT);
+
+ if (show_status)
SetMetroBrowserFlowLauncher::LaunchSoon(profile);
- }
+
+ return show_status;
}
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698