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

Unified Diff: chrome/browser/ui/webui/options/options_managed_banner_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/options_managed_banner_handler.cc
diff --git a/chrome/browser/ui/webui/options/options_managed_banner_handler.cc b/chrome/browser/ui/webui/options/options_managed_banner_handler.cc
deleted file mode 100644
index ddf37858d33e267960034e92b175e1214481687f..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/options/options_managed_banner_handler.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/options/options_managed_banner_handler.h"
-
-#include "base/string_util.h"
-#include "base/values.h"
-#include "chrome/browser/profiles/profile.h"
-#include "content/browser/webui/web_ui.h"
-
-OptionsManagedBannerHandler::OptionsManagedBannerHandler(
- WebUI* web_ui, const string16& page_name, OptionsPage page)
- : policy::ManagedPrefsBannerBase(web_ui->GetProfile()->GetPrefs(), page),
- web_ui_(web_ui), page_name_(page_name), page_(page) {
- // Initialize the visibility state of the banner.
- SetupBannerVisibility();
-}
-
-OptionsManagedBannerHandler::~OptionsManagedBannerHandler() {}
-
-void OptionsManagedBannerHandler::OnUpdateVisibility() {
- // A preference that may be managed has changed. Update our visibility
- // state.
- SetupBannerVisibility();
-}
-
-void OptionsManagedBannerHandler::SetupBannerVisibility() {
- // Construct the banner visibility script name.
- std::string script = "options." + UTF16ToASCII(page_name_) +
- ".getInstance().setManagedBannerVisibility";
-
- // Get the visiblity value from the base class.
- FundamentalValue visibility(DetermineVisibility());
-
- // Set the managed state in the javascript handler.
- web_ui_->CallJavascriptFunction(script, visibility);
-}

Powered by Google App Engine
This is Rietveld 408576698