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

Side by Side Diff: chrome/browser/ui/views/first_run_dialog.cc

Issue 1730893002: Revert of Remove DialogDelegate::OnClosed() which is redundant with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/first_run_dialog.h" 5 #include "chrome/browser/ui/views/first_run_dialog.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/first_run/first_run.h" 9 #include "chrome/browser/first_run/first_run.h"
10 #include "chrome/browser/platform_util.h" 10 #include "chrome/browser/platform_util.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 quit_runloop_.Run(); 104 quit_runloop_.Run();
105 } 105 }
106 106
107 views::View* FirstRunDialog::CreateExtraView() { 107 views::View* FirstRunDialog::CreateExtraView() {
108 views::Link* link = new views::Link(l10n_util::GetStringUTF16( 108 views::Link* link = new views::Link(l10n_util::GetStringUTF16(
109 IDS_LEARN_MORE)); 109 IDS_LEARN_MORE));
110 link->set_listener(this); 110 link->set_listener(this);
111 return link; 111 return link;
112 } 112 }
113 113
114 void FirstRunDialog::OnClosed() {
115 first_run::SetShouldShowWelcomePage();
116 Done();
117 }
118
114 bool FirstRunDialog::Accept() { 119 bool FirstRunDialog::Accept() {
115 GetWidget()->Hide(); 120 GetWidget()->Hide();
116 121
117 if (report_crashes_ && report_crashes_->checked()) { 122 if (report_crashes_ && report_crashes_->checked()) {
118 if (GoogleUpdateSettings::SetCollectStatsConsent(true)) 123 if (GoogleUpdateSettings::SetCollectStatsConsent(true))
119 breakpad::InitCrashReporter(std::string()); 124 breakpad::InitCrashReporter(std::string());
120 } else { 125 } else {
121 GoogleUpdateSettings::SetCollectStatsConsent(false); 126 GoogleUpdateSettings::SetCollectStatsConsent(false);
122 } 127 }
123 128
124 if (make_default_ && make_default_->checked()) 129 if (make_default_ && make_default_->checked())
125 shell_integration::SetAsDefaultBrowser(); 130 shell_integration::SetAsDefaultBrowser();
126 131
127 Done(); 132 Done();
128 return true; 133 return true;
129 } 134 }
130 135
131 int FirstRunDialog::GetDialogButtons() const { 136 int FirstRunDialog::GetDialogButtons() const {
132 return ui::DIALOG_BUTTON_OK; 137 return ui::DIALOG_BUTTON_OK;
133 } 138 }
134 139
135 void FirstRunDialog::WindowClosing() {
136 first_run::SetShouldShowWelcomePage();
137 Done();
138 }
139
140 void FirstRunDialog::LinkClicked(views::Link* source, int event_flags) { 140 void FirstRunDialog::LinkClicked(views::Link* source, int event_flags) {
141 platform_util::OpenExternal(profile_, GURL(chrome::kLearnMoreReportingURL)); 141 platform_util::OpenExternal(profile_, GURL(chrome::kLearnMoreReportingURL));
142 } 142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_dialog.h ('k') | chrome/browser/ui/views/passwords/account_chooser_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698