From 8b07d4f6dfc0b561d3d430f94cbc71f847482295 Mon Sep 17 00:00:00 2001 From: "cpu@chromium.org" Date: Fri, 3 Aug 2012 22:16:48 +0000 Subject: [PATCH] Inactive user toast. Set chrome as default. BUG=129499 TEST=see bug Review URL: https://chromiumcodereview.appspot.com/10826108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149941 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chrome_browser_main.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 5477959515cf..84a6a510644a 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -795,6 +795,13 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; if (answer == TryChromeDialogView::UNINSTALL_CHROME) return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; + // At this point the user is willing to try chrome again. + if (answer == TryChromeDialogView::TRY_CHROME_AS_DEFAULT) { + // Only set in the unattended case, the interactive case is Windows 8. + if (ShellIntegration::CanSetAsDefaultBrowser() == + ShellIntegration::SET_DEFAULT_UNATTENDED) + ShellIntegration::SetAsDefaultBrowser(); + } #else // We don't support retention experiments on Mac or Linux. return content::RESULT_CODE_NORMAL_EXIT; -- 2.11.4.GIT