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

Unified Diff: chrome/common/extensions/extension_file_util.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 7 years, 8 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/common/extensions/extension_file_util.cc
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 4c2fbb00783500b17dc3a91adca890e73b2caab6..b2aba08e59d86339d7b5e4c7e4729a6cbb4c7993 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -492,11 +492,11 @@ base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
return base::FilePath();
base::FilePath path = root.AppendASCII(host).Append(relative_path);
- if (!file_util::PathExists(path) ||
- !file_util::AbsolutePath(&path) ||
- !root.IsParent(path)) {
+ if (!file_util::PathExists(path))
+ return base::FilePath();
+ path = base::MakeAbsoluteFilePath(path);
+ if (path.empty() || !root.IsParent(path))
return base::FilePath();
- }
return path;
}

Powered by Google App Engine
This is Rietveld 408576698