Chromium Code Reviews| Index: extensions/browser/content_verifier.cc |
| diff --git a/extensions/browser/content_verifier.cc b/extensions/browser/content_verifier.cc |
| index 52321c9267ac9e6cdc3e366a47584026e7b58d66..b249d0377318a2eee01d9fb83bd98069cdd72984 100644 |
| --- a/extensions/browser/content_verifier.cc |
| +++ b/extensions/browser/content_verifier.cc |
| @@ -212,6 +212,20 @@ bool ContentVerifier::ShouldVerifyAnyPaths( |
| if (ContainsKey(browser_images, relative_path)) |
| continue; |
| + // The browser image paths from the extension may not be normalized (eg |
| + // they might have leading '/' or './'), so we need to compare basename and |
| + // dirname separately. |
| + bool browser_image_match = false; |
| + for (const auto& image_path : browser_images) { |
|
Ken Rockot(use gerrit already)
2014/10/07 17:25:51
YAY AUTO
|
| + if (image_path.BaseName() == relative_path.BaseName() && |
| + image_path.DirName() == relative_path.DirName()) { |
|
Ken Rockot(use gerrit already)
2014/10/07 17:25:51
Discussed offline, but probably want to compare in
|
| + browser_image_match = true; |
| + break; |
| + } |
| + } |
| + if (browser_image_match) |
| + continue; |
| + |
| base::FilePath full_path = extension_root.Append(relative_path); |
| if (locales_dir.IsParent(full_path)) { |
| if (!all_locales) { |