Index: base/path_service.cc |
diff --git a/base/path_service.cc b/base/path_service.cc |
index 61488d6f75ff4acd8becef175e353a8496b6a421..53c029ac7d70dc6566eeedabd30d93c31ece0cba 100644 |
--- a/base/path_service.cc |
+++ b/base/path_service.cc |
@@ -258,10 +258,14 @@ bool PathService::OverrideAndCreateIfNeeded(int key, |
return false; |
} |
- // We need to have an absolute path. |
- file_path = MakeAbsoluteFilePath(file_path); |
- if (file_path.empty()) |
- return false; |
+ // File path may be already provided as absolute value so avoid calling |
+ // MakeAbsoluteFilePath() since it will fail in case of sandbox. |
+ if (!file_path.IsAbsolute()) { |
+ // We need to have an absolute path. |
+ file_path = MakeAbsoluteFilePath(file_path); |
+ if (file_path.empty()) |
+ return false; |
+ } |
base::AutoLock scoped_lock(path_data->lock); |