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

Unified Diff: components/cronet/android/url_request_context_adapter.h

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Use mock verifier and fix tests Created 5 years, 2 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: components/cronet/android/url_request_context_adapter.h
diff --git a/components/cronet/android/url_request_context_adapter.h b/components/cronet/android/url_request_context_adapter.h
index 539a76afde093974f3e59cb3dcb620e5bcfd9527..9636f6880a09167aa57a66cbdbf34b661a3f685b 100644
--- a/components/cronet/android/url_request_context_adapter.h
+++ b/components/cronet/android/url_request_context_adapter.h
@@ -23,6 +23,12 @@ namespace net {
class WriteToFileNetLogObserver;
class ProxyConfigService;
class SdchOwner;
+
+#if defined(CRONET_TEST)
+class MockCertVerifier;
+class URLRequestContextBuilder;
+#endif
+
} // namespace net
namespace cronet {
@@ -99,6 +105,12 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
// run after context is initialized.
void StopNetLogHelper();
+#if defined(CRONET_TEST)
+ // Additionally configures |builder| for testing.
+ void ConfigureURLRequestContextBuilderForTesting(
+ net::URLRequestContextBuilder* builder);
+#endif
+
scoped_refptr<URLRequestContextAdapterDelegate> delegate_;
scoped_ptr<net::URLRequestContext> context_;
std::string user_agent_;
@@ -110,6 +122,11 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
scoped_ptr<net::SdchOwner> sdch_owner_;
scoped_ptr<URLRequestContextConfig> config_;
+#if defined(CRONET_TEST)
+ // Used in testing to trust certs.
+ scoped_ptr<net::MockCertVerifier> mock_cert_verifier_;
+#endif
+
// A queue of tasks that need to be run after context has been initialized.
std::queue<RunAfterContextInitTask> tasks_waiting_for_context_;
bool is_context_initialized_;

Powered by Google App Engine
This is Rietveld 408576698