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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 14699002: Move BrowserAction references from ExtensionPrefs to ExtensionActionAPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index ff5e9ed9a8752a738dace99cb71ee9612508d82a..8b1620401fc290b3e27cc3d4038cd065d1be8e0f 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -139,9 +139,6 @@ const char kPrefUserDraggedApp[] = "user_dragged_app_ntp";
// A preference for storing extra data sent in update checks for an extension.
const char kUpdateUrlData[] = "update_url_data";
-// Whether the browser action is visible in the toolbar.
-const char kBrowserActionVisible[] = "browser_action_visible";
-
// Preferences that hold which permissions the user has granted the extension.
// We explicitly keep track of these so that extensions can contain unknown
// permissions, for backwards compatibility reasons, and we can still prompt
@@ -1362,32 +1359,6 @@ void ExtensionPrefs::SetExtensionState(const std::string& extension_id,
content_settings_store_->SetExtensionState(extension_id, enabled);
}
-bool ExtensionPrefs::GetBrowserActionVisibility(const Extension* extension) {
- const DictionaryValue* extension_prefs =
- GetExtensionPref(extension->id());
- if (!extension_prefs)
- return true;
-
- bool visible = false;
- if (!extension_prefs->GetBoolean(kBrowserActionVisible, &visible))
- return true;
-
- return visible;
-}
-
-void ExtensionPrefs::SetBrowserActionVisibility(const Extension* extension,
- bool visible) {
- if (GetBrowserActionVisibility(extension) == visible)
- return;
-
- UpdateExtensionPref(extension->id(), kBrowserActionVisible,
- Value::CreateBooleanValue(visible));
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
- content::Source<ExtensionPrefs>(this),
- content::Details<const Extension>(extension));
-}
-
std::string ExtensionPrefs::GetVersionString(const std::string& extension_id) {
const DictionaryValue* extension = GetExtensionPref(extension_id);
if (!extension)
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698