diff options
author | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 15:27:21 +0000 |
---|---|---|
committer | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 15:27:21 +0000 |
commit | 9194b3fc91953bb1472d8671d2322ac5616ee0b4 (patch) | |
tree | d9d60fc09ec8dc5ad6fb65499ad5bcce1d06de0f /chrome/common/extensions/extension_resource.h | |
parent | a4dc33f2e485e586cc3fb03142c2800249fe9ced (diff) | |
download | chromium_src-9194b3fc91953bb1472d8671d2322ac5616ee0b4.zip chromium_src-9194b3fc91953bb1472d8671d2322ac5616ee0b4.tar.gz chromium_src-9194b3fc91953bb1472d8671d2322ac5616ee0b4.tar.bz2 |
Minimize dependency of user scripts.
And made some minor lint fixes and code refactoring on the way, based on CR comments of previous attempt.
BUG=none
TEST=Make sure that the extension resources can still be properly localized and that they also load correctly when they are not localized.
Review URL: http://codereview.chromium.org/267051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_resource.h')
-rw-r--r-- | chrome/common/extensions/extension_resource.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/common/extensions/extension_resource.h b/chrome/common/extensions/extension_resource.h index 7d6e70c6..0356bec 100644 --- a/chrome/common/extensions/extension_resource.h +++ b/chrome/common/extensions/extension_resource.h @@ -22,6 +22,12 @@ class ExtensionResource { // *** MIGHT HIT FILESYSTEM. Do not call on UI thread! *** const FilePath& GetFilePath() const; + // Static version to avoid creating an instance of ExtensionResource + // when all we want is the localization code. + // *** MIGHT HIT FILESYSTEM. Do not call on UI thread! *** + static FilePath GetFilePath(const FilePath& extension_root, + const FilePath& relative_path); + // Getters const FilePath& extension_root() const { return extension_root_; } const FilePath& relative_path() const { return relative_path_; } @@ -31,11 +37,6 @@ class ExtensionResource { bool ComparePathWithDefault(const FilePath& path) const; private: - // Returns normalized full path to the resource. - // Resource doesn't have to exist. - FilePath CombinePathsSafely(const FilePath& extension_root, - const FilePath& relative_path) const; - // Extension root. FilePath extension_root_; |