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

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

Issue 6293006: Allow relative paths to external extension files for some providers, error out for others. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Tested registry install on windows. Created 9 years, 11 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 9224b3b1b0432627f095693fd99d2456c8549d68..4573381b60655ad63d57810a21217a8003803cc0 100644
--- a/chrome/browser/extensions/external_pref_extension_loader.h
+++ b/chrome/browser/extensions/external_pref_extension_loader.h
@@ -19,7 +19,12 @@
// thread and they are expecting public method calls from the UI thread.
class ExternalPrefExtensionLoader : public ExternalExtensionLoader {
public:
- ExternalPrefExtensionLoader();
+ // |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 path_key);
+
+ virtual const FilePath GetBaseCrxFilePath();
protected:
virtual void StartLoading();
@@ -31,6 +36,8 @@ class ExternalPrefExtensionLoader : public ExternalExtensionLoader {
void LoadOnFileThread();
+ int path_key_;
+
DISALLOW_COPY_AND_ASSIGN(ExternalPrefExtensionLoader);
};
@@ -38,7 +45,11 @@ class ExternalPrefExtensionLoader : public ExternalExtensionLoader {
// from json data specified in a string.
class ExternalTestingExtensionLoader : public ExternalExtensionLoader {
public:
- explicit ExternalTestingExtensionLoader(const std::string& json_data);
+ explicit ExternalTestingExtensionLoader(
+ const std::string& json_data,
+ const FilePath& fake_base_path);
+
+ virtual const FilePath GetBaseCrxFilePath();
protected:
virtual void StartLoading();
@@ -48,6 +59,7 @@ class ExternalTestingExtensionLoader : public ExternalExtensionLoader {
virtual ~ExternalTestingExtensionLoader() {}
+ FilePath fake_base_path_;
scoped_ptr<DictionaryValue> testing_prefs_;
DISALLOW_COPY_AND_ASSIGN(ExternalTestingExtensionLoader);

Powered by Google App Engine
This is Rietveld 408576698