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

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

Issue 9838033: Upstream native crash handling changes for Android. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: In response to comments. Lots of linux to posix Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gtk/first_run_dialog.h" 5 #include "chrome/browser/ui/gtk/first_run_dialog.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/installer/util/google_update_settings.h" 21 #include "chrome/installer/util/google_update_settings.h"
22 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
23 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 #include "grit/locale_settings.h" 24 #include "grit/locale_settings.h"
25 #include "grit/theme_resources.h" 25 #include "grit/theme_resources.h"
26 #include "ui/base/gtk/gtk_floating_container.h" 26 #include "ui/base/gtk/gtk_floating_container.h"
27 #include "ui/base/gtk/gtk_hig_constants.h" 27 #include "ui/base/gtk/gtk_hig_constants.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
30 30
31 #if defined(USE_LINUX_BREAKPAD) 31 #if defined(USE_POSIX_BREAKPAD)
32 #include "chrome/app/breakpad_linux.h" 32 #include "chrome/app/breakpad_linux.h"
33 #endif 33 #endif
34 34
35 #if defined(GOOGLE_CHROME_BUILD) 35 #if defined(GOOGLE_CHROME_BUILD)
36 #include "chrome/browser/browser_process.h" 36 #include "chrome/browser/browser_process.h"
37 #include "chrome/browser/prefs/pref_service.h" 37 #include "chrome/browser/prefs/pref_service.h"
38 #endif 38 #endif
39 39
40 namespace { 40 namespace {
41 41
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (dialog_) 178 if (dialog_)
179 gtk_widget_hide_all(dialog_); 179 gtk_widget_hide_all(dialog_);
180 *response_ = response; 180 *response_ = response;
181 181
182 // Mark that first run has ran. 182 // Mark that first run has ran.
183 first_run::CreateSentinel(); 183 first_run::CreateSentinel();
184 184
185 // Check if user has opted into reporting. 185 // Check if user has opted into reporting.
186 if (report_crashes_ && 186 if (report_crashes_ &&
187 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) { 187 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) {
188 #if defined(USE_LINUX_BREAKPAD) 188 #if defined(USE_POSIX_BREAKPAD)
189 if (GoogleUpdateSettings::SetCollectStatsConsent(true)) 189 if (GoogleUpdateSettings::SetCollectStatsConsent(true))
190 InitCrashReporter(); 190 InitCrashReporter();
191 #endif 191 #endif
192 } else { 192 } else {
193 GoogleUpdateSettings::SetCollectStatsConsent(false); 193 GoogleUpdateSettings::SetCollectStatsConsent(false);
194 } 194 }
195 195
196 // If selected set as default browser. 196 // If selected set as default browser.
197 if (make_default_ && 197 if (make_default_ &&
198 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(make_default_))) { 198 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(make_default_))) {
199 ShellIntegration::SetAsDefaultBrowser(); 199 ShellIntegration::SetAsDefaultBrowser();
200 } 200 }
201 201
202 FirstRunDone(); 202 FirstRunDone();
203 } 203 }
204 204
205 void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton* button) { 205 void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton* button) {
206 platform_util::OpenExternal(GURL(chrome::kLearnMoreReportingURL)); 206 platform_util::OpenExternal(GURL(chrome::kLearnMoreReportingURL));
207 } 207 }
208 208
209 void FirstRunDialog::FirstRunDone() { 209 void FirstRunDialog::FirstRunDone() {
210 first_run::SetShowWelcomePagePref(); 210 first_run::SetShowWelcomePagePref();
211 211
212 if (dialog_) 212 if (dialog_)
213 gtk_widget_destroy(dialog_); 213 gtk_widget_destroy(dialog_);
214 MessageLoop::current()->Quit(); 214 MessageLoop::current()->Quit();
215 delete this; 215 delete this;
216 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698