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

Unified Diff: extensions/browser/content_hash_fetcher.cc

Issue 2815243002: Fix two ContentHashFetcherTest.* tests' flakiness. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | extensions/browser/content_hash_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_hash_fetcher.cc
diff --git a/extensions/browser/content_hash_fetcher.cc b/extensions/browser/content_hash_fetcher.cc
index 4ed26fafb1692ca4f39ede9564d179bb7fd9775c..ecf4bbcd75a6508edca144a53a1d7026616ed0c6 100644
--- a/extensions/browser/content_hash_fetcher.cc
+++ b/extensions/browser/content_hash_fetcher.cc
@@ -208,6 +208,7 @@ void ContentHashFetcherJob::Start() {
void ContentHashFetcherJob::Cancel() {
base::AutoLock autolock(cancelled_lock_);
cancelled_ = true;
+ url_fetcher_.reset();
Devlin 2017/04/13 15:12:18 nit: We can get rid of cancelled_ now and use !url
}
bool ContentHashFetcherJob::IsCancelled() {
@@ -444,6 +445,7 @@ void ContentHashFetcherJob::DispatchCallback() {
if (cancelled_)
return;
}
+ url_fetcher_.reset();
lazyboy 2017/04/13 02:06:35 btw, this is the reset that's necessary for the te
Devlin 2017/04/13 15:12:18 Where is the reference to ContentHashFetcherJob in
lazyboy 2017/04/13 16:06:24 You're right, I got too excited yesterday and didn
Devlin 2017/04/13 16:24:45 Hmm... It makes sense why that would solve the pr
callback_.Run(this);
}
« no previous file with comments | « no previous file | extensions/browser/content_hash_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698