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

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

Issue 9320059: Define FilePath::NormalizePathSeparators on all platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 10 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 | « base/file_path_unittest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_protocols.cc
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index fd0537ed08de3a55b2a96acf96bd17693f6ea602..e2dc94f53da6ebb1749b7e144916b97cba386e21 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -286,9 +286,7 @@ ExtensionProtocolHandler::MaybeCreateJob(net::URLRequest* request) const {
directory_path.DirName() == resources_path) {
FilePath relative_path = directory_path.BaseName().Append(
extension_file_util::ExtensionURLToRelativeFilePath(request->url()));
-#if defined(OS_WIN)
- relative_path = relative_path.NormalizeWindowsPathSeparators();
-#endif
+ relative_path = relative_path.NormalizePathSeparators();
// TODO(tc): Make a map of FilePath -> resource ids so we don't have to
// covert to FilePaths all the time. This will be more useful as we add
@@ -296,9 +294,7 @@ ExtensionProtocolHandler::MaybeCreateJob(net::URLRequest* request) const {
for (size_t i = 0; i < kComponentExtensionResourcesSize; ++i) {
FilePath bm_resource_path =
FilePath().AppendASCII(kComponentExtensionResources[i].name);
-#if defined(OS_WIN)
- bm_resource_path = bm_resource_path.NormalizeWindowsPathSeparators();
-#endif
+ bm_resource_path = bm_resource_path.NormalizePathSeparators();
if (relative_path == bm_resource_path) {
return new URLRequestResourceBundleJob(request, relative_path,
kComponentExtensionResources[i].value, content_security_policy,
« no previous file with comments | « base/file_path_unittest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698