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

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

Issue 20743002: Do not CreateSentinel until after the process singleton has been grabbed by the current process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge latest version of https://codereview.chromium.org/20483002/ Created 7 years, 4 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/first_run_dialog.mm ('k') | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698