Index: extensions/common/extension_resource.cc |
diff --git a/extensions/common/extension_resource.cc b/extensions/common/extension_resource.cc |
index 5a70539cce60483882390e91ec467bfd72870a32..f39be7b3aaece2f73e5c843b7128df733ea4e483 100644 |
--- a/extensions/common/extension_resource.cc |
+++ b/extensions/common/extension_resource.cc |
@@ -52,8 +52,8 @@ base::FilePath ExtensionResource::GetFilePath( |
SymlinkPolicy symlink_policy) { |
// We need to resolve the parent references in the extension_root |
// path on its own because IsParent doesn't like parent references. |
- base::FilePath clean_extension_root(extension_root); |
- if (!file_util::AbsolutePath(&clean_extension_root)) |
+ base::FilePath clean_extension_root(extension_root.AsAbsolute()); |
+ if (clean_extension_root.empty()) |
return base::FilePath(); |
base::FilePath full_path = clean_extension_root.Append(relative_path); |
@@ -80,13 +80,13 @@ base::FilePath ExtensionResource::GetFilePath( |
// We must resolve the absolute path of the combined path when |
// the relative path contains references to a parent folder (i.e., '..'). |
- // We also check if the path exists because the posix version of AbsolutePath |
+ // We also check if the path exists because the posix version of AsAbsolute |
// will fail if the path doesn't exist, and we want the same behavior on |
- // Windows... So until the posix and Windows version of AbsolutePath are |
+ // Windows... So until the posix and Windows version of AsAbsolute are |
// unified, we need an extra call to PathExists, unfortunately. |
- // TODO(mad): Fix this once AbsolutePath is unified. |
- if (file_util::AbsolutePath(&full_path) && |
- file_util::PathExists(full_path) && |
+ // TODO(mad): Fix this once AsAbsolute is unified. |
+ full_path = full_path.AsAbsolute(); |
+ if (file_util::PathExists(full_path) && |
(symlink_policy == FOLLOW_SYMLINKS_ANYWHERE || |
clean_extension_root.IsParent(full_path))) { |
return full_path; |