| OLD | NEW |
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 g_signal_connect(dialog_, "response", | 154 g_signal_connect(dialog_, "response", |
| 155 G_CALLBACK(OnResponseDialogThunk), this); | 155 G_CALLBACK(OnResponseDialogThunk), this); |
| 156 gtk_widget_show_all(dialog_); | 156 gtk_widget_show_all(dialog_); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void FirstRunDialog::OnResponseDialog(GtkWidget* widget, int response) { | 159 void FirstRunDialog::OnResponseDialog(GtkWidget* widget, int response) { |
| 160 if (dialog_) | 160 if (dialog_) |
| 161 gtk_widget_hide_all(dialog_); | 161 gtk_widget_hide_all(dialog_); |
| 162 | 162 |
| 163 // Mark that first run has ran. | |
| 164 first_run::CreateSentinel(); | |
| 165 | |
| 166 // Check if user has opted into reporting. | 163 // Check if user has opted into reporting. |
| 167 if (report_crashes_ && | 164 if (report_crashes_ && |
| 168 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) { | 165 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) { |
| 169 if (GoogleUpdateSettings::SetCollectStatsConsent(true)) | 166 if (GoogleUpdateSettings::SetCollectStatsConsent(true)) |
| 170 InitCrashReporter(); | 167 InitCrashReporter(); |
| 171 } else { | 168 } else { |
| 172 GoogleUpdateSettings::SetCollectStatsConsent(false); | 169 GoogleUpdateSettings::SetCollectStatsConsent(false); |
| 173 } | 170 } |
| 174 | 171 |
| 175 // If selected set as default browser. | 172 // If selected set as default browser. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 186 } | 183 } |
| 187 | 184 |
| 188 void FirstRunDialog::FirstRunDone() { | 185 void FirstRunDialog::FirstRunDone() { |
| 189 first_run::SetShouldShowWelcomePage(); | 186 first_run::SetShouldShowWelcomePage(); |
| 190 | 187 |
| 191 if (dialog_) | 188 if (dialog_) |
| 192 gtk_widget_destroy(dialog_); | 189 gtk_widget_destroy(dialog_); |
| 193 base::MessageLoop::current()->Quit(); | 190 base::MessageLoop::current()->Quit(); |
| 194 delete this; | 191 delete this; |
| 195 } | 192 } |
| OLD | NEW |