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

Unified Diff: chrome/browser/prerender/prerender_test_utils.h

Issue 2540203002: NoStatePrefetch: Add a test to verify request priority (Closed)
Patch Set: removed include url_request_filter.h 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
Index: chrome/browser/prerender/prerender_test_utils.h
diff --git a/chrome/browser/prerender/prerender_test_utils.h b/chrome/browser/prerender/prerender_test_utils.h
index 1dd4fcd6b60827a241df919f664b1bf0726b5ebc..dac536759737441a66807d202e570dbf7160fe08 100644
--- a/chrome/browser/prerender/prerender_test_utils.h
+++ b/chrome/browser/prerender/prerender_test_utils.h
@@ -370,11 +370,13 @@ void CreateCountingInterceptorOnIO(
const base::FilePath& file,
const base::WeakPtr<RequestCounter>& counter);
-// Checks that |url| has been requested with net::LOAD_PREFETCH. Pings |counter|
-// after the flag is checked.
-void CreatePrefetchOnlyInterceptorOnIO(
+// When the |url| hits the net::URLRequestFilter (on the IO thread), executes
+// the |callback_io| providing the request to it, also pings the |counter| on UI
+// thread. Does not modify the behavior or the request job.
+void InterceptRequestAndCount(
const GURL& url,
- const base::WeakPtr<RequestCounter>& counter);
+ RequestCounter* counter,
+ base::Callback<void(net::URLRequest*)> callback_io);
// Makes |url| respond to requests with the contents of |file|.
void CreateMockInterceptorOnIO(const GURL& url, const base::FilePath& file);

Powered by Google App Engine
This is Rietveld 408576698