summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_file_util.h
diff options
context:
space:
mode:
authorpenghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 19:09:16 +0000
committerpenghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 19:09:16 +0000
commitb23b1b484ab4f78d5c3107126489328fc8352164 (patch)
tree49d656da83e43cc3f5c585e7a899a0c53a992e56 /chrome/common/extensions/extension_file_util.h
parentd88a7a0805c7cfcbcd05f4876e4314cdb8f9ef97 (diff)
downloadchromium_src-b23b1b484ab4f78d5c3107126489328fc8352164.zip
chromium_src-b23b1b484ab4f78d5c3107126489328fc8352164.tar.gz
chromium_src-b23b1b484ab4f78d5c3107126489328fc8352164.tar.bz2
Add schema chrome-extension-resource:// for extension resources. It may be used for bundle JS libraries in future
like Google Analytics JS library. Mark a test case flaky for OSX, and reland it. BUG=122987 TEST=unit_tests --gtest_filter=ExtensionFileUtil.* TEST=browser_tests --gtest_filter=ExtensionResourceRequestPolicyTest* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137794 Review URL: https://chromiumcodereview.appspot.com/9909019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_file_util.h')
-rw-r--r--chrome/common/extensions/extension_file_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension_file_util.h b/chrome/common/extensions/extension_file_util.h
index 1ab3f07..1ad1120 100644
--- a/chrome/common/extensions/extension_file_util.h
+++ b/chrome/common/extensions/extension_file_util.h
@@ -100,6 +100,10 @@ bool CheckForIllegalFilenames(const FilePath& extension_path,
// Get a relative file path from a chrome-extension:// URL.
FilePath ExtensionURLToRelativeFilePath(const GURL& url);
+// Get a full file path from a chrome-extension-resource:// URL, If the URL
+// points a file outside of root, this function will return empty FilePath.
+FilePath ExtensionResourceURLToFilePath(const GURL& url, const FilePath& root);
+
// Get a path to a temp directory for unpacking an extension.
// This is essentially PathService::Get(chrome::DIR_USER_DATA_TEMP, ...),
// with a histogram that allows us to understand why it is failing.