OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions/gtk_theme_installed_infobar_delegate.h" | 5 #include "chrome/browser/extensions/gtk_theme_installed_infobar_delegate.h" |
6 | 6 |
7 #include "chrome/browser/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 | 8 |
9 GtkThemeInstalledInfoBarDelegate::GtkThemeInstalledInfoBarDelegate( | 9 GtkThemeInstalledInfoBarDelegate::GtkThemeInstalledInfoBarDelegate( |
10 TabContents* tab_contents, | 10 TabContents* tab_contents, |
11 const Extension* new_theme, | 11 const Extension* new_theme, |
12 const std::string& previous_theme_id, | 12 const std::string& previous_theme_id, |
13 bool previous_use_gtk_theme) | 13 bool previous_use_gtk_theme) |
14 : ThemeInstalledInfoBarDelegate(tab_contents, new_theme, previous_theme_id), | 14 : ThemeInstalledInfoBarDelegate(tab_contents, new_theme, previous_theme_id), |
15 previous_use_gtk_theme_(previous_use_gtk_theme) { | 15 previous_use_gtk_theme_(previous_use_gtk_theme) { |
16 } | 16 } |
17 | 17 |
18 bool GtkThemeInstalledInfoBarDelegate::Cancel() { | 18 bool GtkThemeInstalledInfoBarDelegate::Cancel() { |
19 if (previous_use_gtk_theme_) { | 19 if (previous_use_gtk_theme_) { |
20 profile()->SetNativeTheme(); | 20 profile()->SetNativeTheme(); |
21 return true; | 21 return true; |
22 } else { | 22 } else { |
23 return ThemeInstalledInfoBarDelegate::Cancel(); | 23 return ThemeInstalledInfoBarDelegate::Cancel(); |
24 } | 24 } |
25 } | 25 } |
OLD | NEW |