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

Unified Diff: chrome/browser/extensions/external_pref_extension_loader.h

Issue 7718021: Add external extensions json source in proper mac location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rev Created 9 years, 4 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/extensions/external_pref_extension_loader.h
diff --git a/chrome/browser/extensions/external_pref_extension_loader.h b/chrome/browser/extensions/external_pref_extension_loader.h
index 37b8196adaa785dac1be85bb236f223fccd46a4f..4e4c9e2614c9a85d27d44a168ea0c98f1bedb78c 100644
--- a/chrome/browser/extensions/external_pref_extension_loader.h
+++ b/chrome/browser/extensions/external_pref_extension_loader.h
@@ -19,15 +19,27 @@
// thread and they are expecting public method calls from the UI thread.
class ExternalPrefExtensionLoader : public ExternalExtensionLoader {
public:
+ enum Options {
+ NONE = 0,
+
+ // Ensure that only root can force an external install by checking
+ // that all components of the path to external extensions files are
+ // owned by root and not writable by any non-root user.
+ ENSURE_PATH_CONTROLLED_BY_ADMIN = 1<<0
+ };
+
// |base_path_key| is the directory containing the external_extensions.json
// file. Relative file paths to extension files are resolved relative
// to this path.
- explicit ExternalPrefExtensionLoader(int base_path_key);
+ explicit ExternalPrefExtensionLoader(int base_path_key, Options options);
virtual const FilePath GetBaseCrxFilePath();
protected:
virtual void StartLoading();
+ bool IsOptionSet(Options opt) {
+ return (options_ & opt);
+ }
private:
friend class base::RefCountedThreadSafe<ExternalExtensionLoader>;
@@ -37,6 +49,7 @@ class ExternalPrefExtensionLoader : public ExternalExtensionLoader {
void LoadOnFileThread();
int base_path_key_;
+ Options options_;
FilePath base_path_;
DISALLOW_COPY_AND_ASSIGN(ExternalPrefExtensionLoader);

Powered by Google App Engine
This is Rietveld 408576698