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

Unified Diff: extensions/browser/content_verifier.cc

Issue 2572833004: Only whitelist messages.json files in _locales for content verification (Closed)
Patch Set: turn on logging to try and understand win_chromium_x64_rel_ng test failures Created 4 years 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') | extensions/browser/content_verify_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_verifier.cc
diff --git a/extensions/browser/content_verifier.cc b/extensions/browser/content_verifier.cc
index fe04423791f8d89ec6dd634ded774e02dba2dd27..bbcc8ae2234c072246e18557d739f2cb3d9e2829 100644
--- a/extensions/browser/content_verifier.cc
+++ b/extensions/browser/content_verifier.cc
@@ -129,7 +129,7 @@ void ContentVerifier::VerifyFailed(const std::string& extension_id,
if (shutdown_)
return;
- VLOG(1) << "VerifyFailed " << extension_id << " reason:" << reason;
+ LOG(WARNING) << "VerifyFailed " << extension_id << " reason:" << reason;
ExtensionRegistry* registry = ExtensionRegistry::Get(context_);
const Extension* extension =
@@ -153,6 +153,8 @@ void ContentVerifier::OnExtensionLoaded(
if (shutdown_)
return;
+ LOG(WARNING) << "ContentVerifier::OnExtensionLoaded " << extension->id();
+
ContentVerifierDelegate::Mode mode = delegate_->ShouldBeVerified(*extension);
if (mode != ContentVerifierDelegate::NONE) {
// The browser image paths from the extension may not be relative (eg
@@ -213,7 +215,7 @@ void ContentVerifier::OnFetchComplete(
if (shutdown_)
return;
- VLOG(1) << "OnFetchComplete " << extension_id << " success:" << success;
+ LOG(WARNING) << "OnFetchComplete " << extension_id << " success:" << success;
ExtensionRegistry* registry = ExtensionRegistry::Get(context_);
const Extension* extension =
@@ -279,10 +281,12 @@ bool ContentVerifier::ShouldVerifyAnyPaths(
}
// Since message catalogs get transcoded during installation, we want
- // to skip those paths.
+ // to skip those paths. See if this path looks like
+ // _locales/<some locale>/messages.json - if so then skip it.
if (full_path.DirName().DirName() == locales_dir &&
- !extension_l10n_util::ShouldSkipValidation(
- locales_dir, full_path.DirName(), *all_locales))
+ base::ContainsKey(*all_locales,
+ full_path.DirName().BaseName().MaybeAsASCII()) &&
+ full_path == full_path.DirName().Append(kMessagesFilename))
continue;
}
return true;
« no previous file with comments | « extensions/browser/content_hash_fetcher.cc ('k') | extensions/browser/content_verify_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698