Chromium Code Reviews

Unified Diff: chrome/browser/dom_ui/options/advanced_options_handler.cc

Issue 5976010: DOMUI Settings: UTH: Section seperators are wrong if the last section is hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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() {
« no previous file with comments | « chrome/browser/dom_ui/options/advanced_options_handler.h ('k') | chrome/browser/resources/options/advanced_options.js » ('j') | no next file with comments »

Powered by Google App Engine