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

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

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Conforming to the doc Created 8 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 unified diff | Download patch
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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 // Did the extension ask to escalate its permission during an upgrade? 141 // Did the extension ask to escalate its permission during an upgrade?
142 bool DidExtensionEscalatePermissions(const std::string& id); 142 bool DidExtensionEscalatePermissions(const std::string& id);
143 143
144 // If |did_escalate| is true, the preferences for |extension| will be set to 144 // If |did_escalate| is true, the preferences for |extension| will be set to
145 // require the install warning when the user tries to enable. 145 // require the install warning when the user tries to enable.
146 void SetDidExtensionEscalatePermissions( 146 void SetDidExtensionEscalatePermissions(
147 const Extension* extension, 147 const Extension* extension,
148 bool did_escalate); 148 bool did_escalate);
149 149
150 // Does the extension declare requirements that the system does not meet?
151 bool HasUnsupportedRequirements(const std::string& extension_id);
152
153 // Remove any unsupported requirement warnings that this extension has.
154 void ClearUnsupportedRequirements(const std::string& extension_id);
155
156 void SetUnsupportedRequirements(const std::string& extension_id,
157 std::vector<std::string> requirement_errors);
158
159 std::vector<std::string> GetUnsupportedRequirements(
160 const std::string& extension_id);
161
150 // Getter and setters for disabled reason. 162 // Getter and setters for disabled reason.
151 Extension::DisableReason GetDisableReason( 163 Extension::DisableReason GetDisableReason(
152 const std::string& extension_id); 164 const std::string& extension_id);
153 void SetDisableReason(const std::string& extension_id, 165 void SetDisableReason(const std::string& extension_id,
154 Extension::DisableReason disable_reason); 166 Extension::DisableReason disable_reason);
155 void RemoveDisableReason(const std::string& extension_id); 167 void RemoveDisableReason(const std::string& extension_id);
156 168
157 // Returns the version string for the currently installed extension, or 169 // Returns the version string for the currently installed extension, or
158 // the empty string if not found. 170 // the empty string if not found.
159 std::string GetVersionString(const std::string& extension_id); 171 std::string GetVersionString(const std::string& extension_id);
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 scoped_ptr<ExtensionSorting> extension_sorting_; 570 scoped_ptr<ExtensionSorting> extension_sorting_;
559 571
560 scoped_refptr<ContentSettingsStore> content_settings_store_; 572 scoped_refptr<ContentSettingsStore> content_settings_store_;
561 573
562 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 574 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
563 }; 575 };
564 576
565 } // namespace extensions 577 } // namespace extensions
566 578
567 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 579 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698