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

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

Issue 1686433002: Remove DialogDelegate::OnClosed() which is redundant with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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
119 bool FirstRunDialog::Accept() { 114 bool FirstRunDialog::Accept() {
120 GetWidget()->Hide(); 115 GetWidget()->Hide();
121 116
122 if (report_crashes_ && report_crashes_->checked()) { 117 if (report_crashes_ && report_crashes_->checked()) {
123 if (GoogleUpdateSettings::SetCollectStatsConsent(true)) 118 if (GoogleUpdateSettings::SetCollectStatsConsent(true))
124 breakpad::InitCrashReporter(std::string()); 119 breakpad::InitCrashReporter(std::string());
125 } else { 120 } else {
126 GoogleUpdateSettings::SetCollectStatsConsent(false); 121 GoogleUpdateSettings::SetCollectStatsConsent(false);
127 } 122 }
128 123
129 if (make_default_ && make_default_->checked()) 124 if (make_default_ && make_default_->checked())
130 shell_integration::SetAsDefaultBrowser(); 125 shell_integration::SetAsDefaultBrowser();
131 126
132 Done(); 127 Done();
133 return true; 128 return true;
134 } 129 }
135 130
136 int FirstRunDialog::GetDialogButtons() const { 131 int FirstRunDialog::GetDialogButtons() const {
137 return ui::DIALOG_BUTTON_OK; 132 return ui::DIALOG_BUTTON_OK;
138 } 133 }
139 134
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