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

Unified Diff: extensions/browser/content_verifier.cc

Issue 1250473002: Fix content verifier problem with content scripts (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed logging and reworked test to elimnate flakiness Created 5 years, 5 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_verifier.h ('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 b85e8eeebcac6f77b6bac1d0b7f300b2568cfd45..eaafe8f403bb2175063aa12d9ab6fe82cbceca63 100644
--- a/extensions/browser/content_verifier.cc
+++ b/extensions/browser/content_verifier.cc
@@ -20,6 +20,17 @@
namespace extensions {
+namespace {
+
+ContentVerifier::TestObserver* g_test_observer = NULL;
+
+} // namespace
+
+// static
+void ContentVerifier::SetObserverForTests(TestObserver* observer) {
+ g_test_observer = observer;
+}
+
ContentVerifier::ContentVerifier(content::BrowserContext* context,
ContentVerifierDelegate* delegate)
: shutdown_(false),
@@ -188,6 +199,9 @@ void ContentVerifier::OnFetchComplete(
bool success,
bool was_force_check,
const std::set<base::FilePath>& hash_mismatch_paths) {
+ if (g_test_observer)
+ g_test_observer->OnFetchComplete(extension_id, success);
+
if (shutdown_)
return;
« no previous file with comments | « extensions/browser/content_verifier.h ('k') | extensions/browser/content_verify_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698