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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2904823002: Inactive toast ux changes (Closed)
Patch Set: switch to vector icons. Simplify new button class as a function Created 3 years, 5 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/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 294ab872336deb568b4ac1a48072e673dc2cbc33..4b8263165cb6b330eb8ec4a1e4747ab0393ea172 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -209,7 +209,7 @@
#include "chrome/browser/downgrade/user_data_downgrade.h"
#include "chrome/browser/first_run/upgrade_util_win.h"
#include "chrome/browser/ui/network_profile_bubble.h"
-#include "chrome/browser/ui/views/try_chrome_dialog_view.h"
+#include "chrome/browser/ui/views/try_chrome_dialog.h"
#include "chrome/browser/win/browser_util.h"
#include "chrome/browser/win/chrome_select_file_dialog_factory.h"
#include "chrome/install_static/install_util.h"
@@ -1565,21 +1565,21 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// successfully grabbed above.
int try_chrome_int;
base::StringToInt(try_chrome, &try_chrome_int);
- TryChromeDialogView::Result answer = TryChromeDialogView::Show(
+ TryChromeDialog::Result answer = TryChromeDialog::Show(
try_chrome_int,
base::Bind(&ChromeProcessSingleton::SetActiveModalDialog,
base::Unretained(process_singleton_.get())));
- if (answer == TryChromeDialogView::NOT_NOW)
+ if (answer == TryChromeDialog::NOT_NOW) {
sky 2017/07/18 17:10:31 no {} That said, wouldn't a switch be better here?
skare_ 2017/07/21 03:11:35 case'd
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. This is not true on Windows 8+.
- if (shell_integration::GetDefaultWebClientSetPermission() ==
- shell_integration::SET_DEFAULT_UNATTENDED) {
- shell_integration::SetAsDefaultBrowser();
- }
+ }
+ // User asked to launch Chrome; welcome page is shown in some experimental
+ // cases.
+ if (answer == TryChromeDialog::OPEN_CHROME_WELCOME) {
+ browser_creator_->set_welcome_back_page(
+ StartupBrowserCreator::WelcomeBackPage::kWelcomeStandard);
+ } else if (answer == TryChromeDialog::OPEN_CHROME_WELCOME_WIN10) {
+ browser_creator_->set_welcome_back_page(
+ StartupBrowserCreator::WelcomeBackPage::kWelcomeWin10);
}
#else
// We don't support retention experiments on Mac or Linux.

Powered by Google App Engine
This is Rietveld 408576698