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

Unified Diff: net/url_request/url_request_test_util.h

Issue 10440119: Introduce a delegate to avoid hardcoding "chrome-extension" in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge to LKGR Created 8 years, 6 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
Index: net/url_request/url_request_test_util.h
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index 26ce942f73d008357f48a7643e8945a8a71e044c..14dd1277929d7500b5a195b09ea3baffd20fe205 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -38,6 +38,7 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_context_storage.h"
+#include "net/url_request/url_request_throttler_manager.h"
using base::TimeDelta;
@@ -101,6 +102,14 @@ class TestURLRequest : public net::URLRequest {
const scoped_ptr<net::URLRequestContext> context_;
};
+
+// An URLRequestThrottlerManagerDelegate that always allows rejecting requests.
+class TestURLRequestThrottlerManagerDelegate
+ : public net::URLRequestThrottlerManagerDelegate {
+ public:
+ virtual bool MayRejectRequest(net::URLRequest* request) OVERRIDE;
+};
+
//-----------------------------------------------------------------------------
class TestDelegate : public net::URLRequest::Delegate {

Powered by Google App Engine
This is Rietveld 408576698