| Index: chrome/browser/ui/gtk/first_run_dialog.cc
|
| diff --git a/chrome/browser/ui/gtk/first_run_dialog.cc b/chrome/browser/ui/gtk/first_run_dialog.cc
|
| index aa4b7800490a609fe1f73c798dbefaf47cc8ff3b..37896b0f3f4a9d56742ade597628ac8e1cd383e7 100644
|
| --- a/chrome/browser/ui/gtk/first_run_dialog.cc
|
| +++ b/chrome/browser/ui/gtk/first_run_dialog.cc
|
| @@ -68,17 +68,16 @@ void SetWelcomePosition(GtkFloatingContainer* container,
|
|
|
| namespace first_run {
|
|
|
| -void ShowFirstRunDialog(Profile* profile) {
|
| - FirstRunDialog::Show();
|
| +bool ShowFirstRunDialog(Profile* profile) {
|
| + return FirstRunDialog::Show();
|
| }
|
|
|
| } // namespace first_run
|
|
|
| // static
|
| bool FirstRunDialog::Show() {
|
| -#if !defined(GOOGLE_CHROME_BUILD)
|
| - return true; // Nothing to do
|
| -#else
|
| + bool dialog_shown = false;
|
| +#if defined(GOOGLE_CHROME_BUILD)
|
| // If the metrics reporting is managed, we won't ask.
|
| const PrefService::Preference* metrics_reporting_pref =
|
| g_browser_process->local_state()->FindPreference(
|
| @@ -87,11 +86,12 @@ bool FirstRunDialog::Show() {
|
| !metrics_reporting_pref->IsManaged();
|
|
|
| if (!show_reporting_dialog)
|
| - return true; // Nothing to do
|
| + return; // Nothing to do
|
|
|
| int response = -1;
|
| // Object deletes itself.
|
| new FirstRunDialog(show_reporting_dialog, &response);
|
| + dialog_shown = true;
|
|
|
| // TODO(port): it should be sufficient to just run the dialog:
|
| // int response = gtk_dialog_run(GTK_DIALOG(dialog));
|
| @@ -99,9 +99,8 @@ bool FirstRunDialog::Show() {
|
| // http://code.google.com/p/chromium/issues/detail?id=12552
|
| // Instead, run a loop and extract the response manually.
|
| MessageLoop::current()->Run();
|
| -
|
| - return (response == GTK_RESPONSE_ACCEPT);
|
| #endif // defined(GOOGLE_CHROME_BUILD)
|
| + return dialog_shown;
|
| }
|
|
|
| FirstRunDialog::FirstRunDialog(bool show_reporting_dialog, int* response)
|
|
|