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

Side by Side Diff: chrome/browser/extensions/extension_prefs.h

Issue 9620010: Added Protector backup for Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments, removed blacklist from extension ID list, added unittest. Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void OnExtensionUninstalled(const std::string& extension_id, 114 void OnExtensionUninstalled(const std::string& extension_id,
115 const Extension::Location& location, 115 const Extension::Location& location,
116 bool external_uninstall); 116 bool external_uninstall);
117 117
118 // Called to change the extension's state when it is enabled/disabled. 118 // Called to change the extension's state when it is enabled/disabled.
119 void SetExtensionState(const std::string& extension_id, Extension::State); 119 void SetExtensionState(const std::string& extension_id, Extension::State);
120 120
121 // Returns all installed extensions 121 // Returns all installed extensions
122 void GetExtensions(ExtensionIdSet* out); 122 void GetExtensions(ExtensionIdSet* out);
123 123
124 // Returns all installed extensions from |extension_prefs|. This is exposed
125 // for ProtectedPrefsWatcher because it needs access to the extension ID list
126 // before the ExtensionService is initialized.
127 static void GetExtensionsFrom(const base::DictionaryValue* extension_prefs,
Aaron Boodman 2012/03/13 19:45:15 Just return ExtensionIdSet. Most compilers will op
Ivan Korotkov 2012/03/14 13:06:45 Done. Is it ok that there is inconsistency between
128 ExtensionIdSet* out);
129
124 // Getter and setter for browser action visibility. 130 // Getter and setter for browser action visibility.
125 bool GetBrowserActionVisibility(const Extension* extension); 131 bool GetBrowserActionVisibility(const Extension* extension);
126 void SetBrowserActionVisibility(const Extension* extension, bool visible); 132 void SetBrowserActionVisibility(const Extension* extension, bool visible);
127 133
128 // Did the extension ask to escalate its permission during an upgrade? 134 // Did the extension ask to escalate its permission during an upgrade?
129 bool DidExtensionEscalatePermissions(const std::string& id); 135 bool DidExtensionEscalatePermissions(const std::string& id);
130 136
131 // If |did_escalate| is true, the preferences for |extension| will be set to 137 // If |did_escalate| is true, the preferences for |extension| will be set to
132 // require the install warning when the user tries to enable. 138 // require the install warning when the user tries to enable.
133 void SetDidExtensionEscalatePermissions(const Extension* extension, 139 void SetDidExtensionEscalatePermissions(const Extension* extension,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // Contains all the logic for handling the order for various extension 504 // Contains all the logic for handling the order for various extension
499 // properties. 505 // properties.
500 scoped_ptr<ExtensionSorting> extension_sorting_; 506 scoped_ptr<ExtensionSorting> extension_sorting_;
501 507
502 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; 508 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
503 509
504 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 510 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
505 }; 511 };
506 512
507 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 513 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698