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

Unified Diff: extensions/browser/verified_contents.cc

Issue 361523002: Fix some more problems with windows paths in content verification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « extensions/browser/content_hash_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/verified_contents.cc
diff --git a/extensions/browser/verified_contents.cc b/extensions/browser/verified_contents.cc
index 1defc4799920fd85fc585f33b0d1cb002a2fbdf6..f4272b7ceeb7d6701e7ed98ffc8acac051f3a20e 100644
--- a/extensions/browser/verified_contents.cc
+++ b/extensions/browser/verified_contents.cc
@@ -185,9 +185,6 @@ bool VerifiedContents::InitFrom(const base::FilePath& path,
return false;
base::FilePath file_path =
base::FilePath::FromUTF8Unsafe(file_path_string);
-#if defined(FILE_PATH_USES_WIN_SEPARATORS)
- file_path = file_path.NormalizePathSeparators();
-#endif // defined(FILE_PATH_USES_WIN_SEPARATORS)
root_hashes_[file_path] = std::string();
root_hashes_[file_path].swap(root_hash);
}
@@ -200,7 +197,7 @@ bool VerifiedContents::InitFrom(const base::FilePath& path,
const std::string* VerifiedContents::GetTreeHashRoot(
const base::FilePath& relative_path) {
std::map<base::FilePath, std::string>::const_iterator i =
- root_hashes_.find(relative_path);
+ root_hashes_.find(relative_path.NormalizePathSeparatorsTo('/'));
if (i == root_hashes_.end())
return NULL;
return &i->second;
« no previous file with comments | « extensions/browser/content_hash_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698