Index: chrome/browser/dom_ui/options/advanced_options_handler.cc |
diff --git a/chrome/browser/dom_ui/options/advanced_options_handler.cc b/chrome/browser/dom_ui/options/advanced_options_handler.cc |
index 9531d84a727e07e13956695e0d63f41e00946c88..e4acf1750fa7764e3ad314a499613e6ba793b612 100644 |
--- a/chrome/browser/dom_ui/options/advanced_options_handler.cc |
+++ b/chrome/browser/dom_ui/options/advanced_options_handler.cc |
@@ -205,6 +205,8 @@ void AdvancedOptionsHandler::Initialize() { |
if (cloud_print_proxy_ui_enabled_) { |
SetupCloudPrintProxySection(); |
RefreshCloudPrintStatusFromService(); |
+ } else { |
+ RemoveCloudPrintProxySection(); |
} |
#endif |
banner_handler_.reset( |
@@ -470,8 +472,7 @@ void AdvancedOptionsHandler::RefreshCloudPrintStatusFromService() { |
void AdvancedOptionsHandler::SetupCloudPrintProxySection() { |
if (NULL == dom_ui_->GetProfile()->GetCloudPrintProxyService()) { |
cloud_print_proxy_ui_enabled_ = false; |
- dom_ui_->CallJavascriptFunction( |
- L"options.AdvancedOptions.HideCloudPrintProxySection"); |
+ RemoveCloudPrintProxySection(); |
return; |
} |
@@ -495,6 +496,12 @@ void AdvancedOptionsHandler::SetupCloudPrintProxySection() { |
L"options.AdvancedOptions.SetupCloudPrintProxySection", |
disabled, label); |
} |
+ |
+void AdvancedOptionsHandler::RemoveCloudPrintProxySection() { |
+ dom_ui_->CallJavascriptFunction( |
+ L"options.AdvancedOptions.RemoveCloudPrintProxySection"); |
+} |
+ |
#endif |
void AdvancedOptionsHandler::SetupMetricsReportingCheckbox() { |