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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1175733002: [Cronet] Set up HttpServerPropertiesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Findbug error 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 | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 771bc3f25f28e91c929b3e60c4baae85ce8ca54b..14f5491f96a87f50341811948c60ec846c6c3a76 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -26,6 +26,7 @@
#include "net/http/http_network_layer.h"
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
+#include "net/http/http_server_properties_manager.h"
#include "net/http/transport_security_persister.h"
#include "net/http/transport_security_state.h"
#include "net/ssl/channel_id_service.h"
@@ -243,6 +244,11 @@ void URLRequestContextBuilder::SetFileTaskRunner(
file_task_runner_ = task_runner;
}
+void URLRequestContextBuilder::SetHttpServerProperties(
+ scoped_ptr<HttpServerProperties> http_server_properties) {
+ http_server_properties_ = http_server_properties.Pass();
+}
+
URLRequestContext* URLRequestContextBuilder::Build() {
BasicURLRequestContext* context =
new BasicURLRequestContext(file_task_runner_);
@@ -326,8 +332,13 @@ URLRequestContext* URLRequestContextBuilder::Build() {
false)));
}
- storage->set_http_server_properties(
- scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+ if (http_server_properties_) {
+ storage->set_http_server_properties(http_server_properties_.Pass());
+ } else {
+ storage->set_http_server_properties(
+ scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+ }
+
storage->set_cert_verifier(CertVerifier::CreateDefault());
if (throttling_enabled_)
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698