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

Side by Side Diff: chrome/browser/ui/webui/options/advanced_options_handler.cc

Issue 7342009: Show a different banner in chrome://settings for extension-controlled settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 5 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) 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/webui/options/advanced_options_handler.h" 5 #include "chrome/browser/ui/webui/options/advanced_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/download/download_manager.h" 15 #include "chrome/browser/download/download_manager.h"
16 #include "chrome/browser/download/download_prefs.h" 16 #include "chrome/browser/download/download_prefs.h"
17 #include "chrome/browser/google/google_util.h" 17 #include "chrome/browser/google/google_util.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 19 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
20 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" 20 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
21 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" 21 #include "chrome/browser/printing/cloud_print/cloud_print_url.h"
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/service/service_process_control.h" 23 #include "chrome/browser/service/service_process_control.h"
24 #include "chrome/browser/ui/options/options_util.h" 24 #include "chrome/browser/ui/options/options_util.h"
25 #include "chrome/browser/ui/webui/options/options_managed_banner_handler.h"
26 #include "chrome/common/chrome_notification_types.h" 25 #include "chrome/common/chrome_notification_types.h"
27 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
29 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
30 #include "content/browser/tab_contents/tab_contents.h" 29 #include "content/browser/tab_contents/tab_contents.h"
31 #include "content/browser/tab_contents/tab_contents_view.h" 30 #include "content/browser/tab_contents/tab_contents_view.h"
32 #include "content/browser/user_metrics.h" 31 #include "content/browser/user_metrics.h"
33 #include "content/common/content_notification_types.h" 32 #include "content/common/content_notification_types.h"
34 #include "content/common/notification_details.h" 33 #include "content/common/notification_details.h"
35 #include "grit/chromium_strings.h" 34 #include "grit/chromium_strings.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 SetupCloudPrintProxySection(); 195 SetupCloudPrintProxySection();
197 RefreshCloudPrintStatusFromService(); 196 RefreshCloudPrintStatusFromService();
198 } else { 197 } else {
199 RemoveCloudPrintProxySection(); 198 RemoveCloudPrintProxySection();
200 } 199 }
201 #endif 200 #endif
202 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) 201 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
203 SetupBackgroundModeSettings(); 202 SetupBackgroundModeSettings();
204 #endif 203 #endif
205 204
206 #if defined(ENABLE_CONFIGURATION_POLICY)
207 banner_handler_.reset(
208 new OptionsManagedBannerHandler(web_ui_,
209 ASCIIToUTF16("AdvancedOptions"),
210 OPTIONS_PAGE_ADVANCED));
211 #endif
212 } 205 }
213 206
214 WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) { 207 WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) {
215 // Call through to superclass. 208 // Call through to superclass.
216 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui); 209 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui);
217 210
218 // Register for preferences that we need to observe manually. These have 211 // Register for preferences that we need to observe manually. These have
219 // special behaviors that aren't handled by the standard prefs UI. 212 // special behaviors that aren't handled by the standard prefs UI.
220 DCHECK(web_ui_); 213 DCHECK(web_ui_);
221 PrefService* prefs = web_ui_->GetProfile()->GetPrefs(); 214 PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 web_ui_->CallJavascriptFunction( 630 web_ui_->CallJavascriptFunction(
638 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); 631 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled);
639 } 632 }
640 { 633 {
641 FundamentalValue checked(tls1_enabled_.GetValue()); 634 FundamentalValue checked(tls1_enabled_.GetValue());
642 FundamentalValue disabled(tls1_enabled_.IsManaged()); 635 FundamentalValue disabled(tls1_enabled_.IsManaged());
643 web_ui_->CallJavascriptFunction( 636 web_ui_->CallJavascriptFunction(
644 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); 637 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled);
645 } 638 }
646 } 639 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/advanced_options_handler.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698