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/webui/options2/browser_options_handler2.cc

Issue 10337010: Revert r123782. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/webui/options2/browser_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "base/string_number_conversions.h" 17 #include "base/string_number_conversions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "base/values.h"
19 #include "base/value_conversions.h" 20 #include "base/value_conversions.h"
20 #include "base/values.h"
21 #include "chrome/browser/auto_launch_trial.h" 21 #include "chrome/browser/auto_launch_trial.h"
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chrome_page_zoom.h" 23 #include "chrome/browser/chrome_page_zoom.h"
24 #include "chrome/browser/custom_home_pages_table_model.h" 24 #include "chrome/browser/custom_home_pages_table_model.h"
25 #include "chrome/browser/download/download_prefs.h" 25 #include "chrome/browser/download/download_prefs.h"
26 #include "chrome/browser/instant/instant_controller.h" 26 #include "chrome/browser/instant/instant_controller.h"
27 #include "chrome/browser/instant/instant_field_trial.h" 27 #include "chrome/browser/instant/instant_field_trial.h"
28 #include "chrome/browser/net/url_fixer_upper.h" 28 #include "chrome/browser/net/url_fixer_upper.h"
29 #include "chrome/browser/prefs/pref_service.h" 29 #include "chrome/browser/prefs/pref_service.h"
30 #include "chrome/browser/prefs/session_startup_pref.h" 30 #include "chrome/browser/prefs/session_startup_pref.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "chrome/browser/ui/browser_window.h" 89 #include "chrome/browser/ui/browser_window.h"
90 #include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h" 90 #include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h"
91 #include "third_party/skia/include/core/SkBitmap.h" 91 #include "third_party/skia/include/core/SkBitmap.h"
92 #endif // defined(OS_CHROMEOS) 92 #endif // defined(OS_CHROMEOS)
93 93
94 #if defined(OS_WIN) 94 #if defined(OS_WIN)
95 #include "chrome/installer/util/auto_launch_util.h" 95 #include "chrome/installer/util/auto_launch_util.h"
96 #endif // defined(OS_WIN) 96 #endif // defined(OS_WIN)
97 97
98 #if defined(TOOLKIT_GTK) 98 #if defined(TOOLKIT_GTK)
99 #include "chrome/browser/ui/gtk/theme_service_gtk.h" 99 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
100 #endif // defined(TOOLKIT_GTK) 100 #endif // defined(TOOLKIT_GTK)
101 101
102 using content::BrowserThread; 102 using content::BrowserThread;
103 using content::DownloadManager; 103 using content::DownloadManager;
104 using content::OpenURLParams; 104 using content::OpenURLParams;
105 using content::Referrer; 105 using content::Referrer;
106 using content::UserMetricsAction; 106 using content::UserMetricsAction;
107 107
108 namespace options2 { 108 namespace options2 {
109 109
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 // This handler could have been called in managed mode, for example because 951 // This handler could have been called in managed mode, for example because
952 // the user fiddled with the web inspector. Silently return in this case. 952 // the user fiddled with the web inspector. Silently return in this case.
953 if (!ProfileManager::IsMultipleProfilesEnabled()) 953 if (!ProfileManager::IsMultipleProfilesEnabled())
954 return; 954 return;
955 ProfileManager::CreateMultiProfileAsync(); 955 ProfileManager::CreateMultiProfileAsync();
956 } 956 }
957 957
958 void BrowserOptionsHandler::ObserveThemeChanged() { 958 void BrowserOptionsHandler::ObserveThemeChanged() {
959 Profile* profile = Profile::FromWebUI(web_ui()); 959 Profile* profile = Profile::FromWebUI(web_ui());
960 #if defined(TOOLKIT_GTK) 960 #if defined(TOOLKIT_GTK)
961 ThemeServiceGtk* theme_service = ThemeServiceGtk::GetFrom(profile); 961 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
962 bool is_gtk_theme = theme_service->UsingNativeTheme(); 962 bool is_gtk_theme = theme_service->UsingNativeTheme();
963 base::FundamentalValue gtk_enabled(!is_gtk_theme); 963 base::FundamentalValue gtk_enabled(!is_gtk_theme);
964 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled", 964 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled",
965 gtk_enabled); 965 gtk_enabled);
966 #else 966 #else
967 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); 967 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
968 bool is_gtk_theme = false; 968 bool is_gtk_theme = false;
969 #endif 969 #endif
970 970
971 bool is_classic_theme = !is_gtk_theme && theme_service->UsingDefaultTheme(); 971 bool is_classic_theme = !is_gtk_theme && theme_service->UsingDefaultTheme();
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 } 1415 }
1416 1416
1417 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1417 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1420 web_ui()->CallJavascriptFunction( 1420 web_ui()->CallJavascriptFunction(
1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1422 } 1422 }
1423 1423
1424 } // namespace options2 1424 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698