summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 00:43:58 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 00:43:58 +0000
commit516fc39eeea5658b9aeeda0094d5817edd5ec235 (patch)
treedc0824b91d1abd20ba2b0c213e2ae38cf42f27d8 /chrome
parente150c038b4bc92ce5518688737d32bc5208fa250 (diff)
downloadchromium_src-516fc39eeea5658b9aeeda0094d5817edd5ec235.zip
chromium_src-516fc39eeea5658b9aeeda0094d5817edd5ec235.tar.gz
chromium_src-516fc39eeea5658b9aeeda0094d5817edd5ec235.tar.bz2
Better error output when background page fails to load.
BUG=37082 TEST=Try loading a test extension with a background_page entry in your manifest.json for a file that doesn't exist. You should see the name from your manifest in the error output. Review URL: http://codereview.chromium.org/660287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/extensions/extension_file_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 0192b67..5edfff5 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -257,9 +257,9 @@ bool ValidateExtension(Extension* extension, std::string* error) {
FilePath page_path = ExtensionURLToRelativeFilePath(
extension->background_url());
const FilePath path = extension->GetResource(page_path).GetFilePath();
- if (!file_util::PathExists(path)) {
+ if (path.empty() || !file_util::PathExists(path)) {
*error = StringPrintf("Could not load background page '%s'.",
- WideToUTF8(path.ToWStringHack()).c_str());
+ WideToUTF8(page_path.ToWStringHack()).c_str());
return false;
}
}