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

Unified Diff: chrome/browser/extensions/user_script_master.cc

Issue 7528021: Fix to make the log more meaningful when a user script file of an extension cannot be located (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/user_script_master.cc
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index 8267b78eef58d5f5b7bc7fe5d4af5cebcfec180a..5e680980cd7cb94e6b3a4356884540f9d6bda263 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -164,7 +164,13 @@ static bool LoadScriptContent(UserScript::File* script_file) {
std::string content;
const FilePath& path = ExtensionResource::GetFilePath(
script_file->extension_root(), script_file->relative_path());
- if (path.empty() || !file_util::ReadFileToString(path, &content)) {
+ if (path.empty()) {
+ LOG(WARNING) << "Failed to get file path to "
+ << script_file->relative_path().value() << " from "
+ << script_file->extension_root().value();
+ return false;
+ }
+ if (!file_util::ReadFileToString(path, &content)) {
LOG(WARNING) << "Failed to load user script file: " << path.value();
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698