| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/update_recommended_dialog.h" | 5 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 FALSE, FALSE, 0); | 45 FALSE, FALSE, 0); |
| 46 | 46 |
| 47 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); | 47 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); |
| 48 | 48 |
| 49 gtk_widget_show_all(dialog_); | 49 gtk_widget_show_all(dialog_); |
| 50 } | 50 } |
| 51 | 51 |
| 52 UpdateRecommendedDialog::~UpdateRecommendedDialog() { | 52 UpdateRecommendedDialog::~UpdateRecommendedDialog() { |
| 53 } | 53 } |
| 54 | 54 |
| 55 void UpdateRecommendedDialog::OnResponse(GtkWidget* sender, gint response_id) { | 55 void UpdateRecommendedDialog::OnResponse(GtkWidget* dialog, int response_id) { |
| 56 gtk_widget_destroy(dialog_); | 56 gtk_widget_destroy(dialog_); |
| 57 | 57 |
| 58 if (response_id == GTK_RESPONSE_ACCEPT) { | 58 if (response_id == GTK_RESPONSE_ACCEPT) { |
| 59 // Set the flag to restore the last session on shutdown. | 59 // Set the flag to restore the last session on shutdown. |
| 60 PrefService* pref_service = g_browser_process->local_state(); | 60 PrefService* pref_service = g_browser_process->local_state(); |
| 61 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true); | 61 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true); |
| 62 | 62 |
| 63 BrowserList::CloseAllBrowsersAndExit(); | 63 BrowserList::CloseAllBrowsersAndExit(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 delete this; | 66 delete this; |
| 67 } | 67 } |
| OLD | NEW |