OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/glue/http_bridge.h" | 5 #include "chrome/browser/sync/glue/http_bridge.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 HttpBridge::RequestContext::RequestContext( | 72 HttpBridge::RequestContext::RequestContext( |
73 net::URLRequestContext* baseline_context) | 73 net::URLRequestContext* baseline_context) |
74 : baseline_context_(baseline_context) { | 74 : baseline_context_(baseline_context) { |
75 | 75 |
76 // Create empty, in-memory cookie store. | 76 // Create empty, in-memory cookie store. |
77 set_cookie_store(new net::CookieMonster(NULL, NULL)); | 77 set_cookie_store(new net::CookieMonster(NULL, NULL)); |
78 | 78 |
79 // We don't use a cache for bridged loads, but we do want to share proxy info. | 79 // We don't use a cache for bridged loads, but we do want to share proxy info. |
80 set_host_resolver(baseline_context->host_resolver()); | 80 set_host_resolver(baseline_context->host_resolver()); |
81 set_proxy_service(baseline_context->proxy_service()); | 81 set_proxy_service(baseline_context->proxy_service()); |
| 82 set_spdy_config_service(baseline_context->spdy_config_service()); |
82 set_ssl_config_service(baseline_context->ssl_config_service()); | 83 set_ssl_config_service(baseline_context->ssl_config_service()); |
83 | 84 |
84 // We want to share the HTTP session data with the network layer factory, | 85 // We want to share the HTTP session data with the network layer factory, |
85 // which includes auth_cache for proxies. | 86 // which includes auth_cache for proxies. |
86 // Session is not refcounted so we need to be careful to not lose the parent | 87 // Session is not refcounted so we need to be careful to not lose the parent |
87 // context. | 88 // context. |
88 net::HttpNetworkSession* session = | 89 net::HttpNetworkSession* session = |
89 baseline_context->http_transaction_factory()->GetSession(); | 90 baseline_context->http_transaction_factory()->GetSession(); |
90 DCHECK(session); | 91 DCHECK(session); |
91 set_http_transaction_factory(new net::HttpNetworkLayer(session)); | 92 set_http_transaction_factory(new net::HttpNetworkLayer(session)); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. | 291 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. |
291 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); | 292 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); |
292 fetch_state_.url_poster = NULL; | 293 fetch_state_.url_poster = NULL; |
293 | 294 |
294 // Wake the blocked syncer thread in MakeSynchronousPost. | 295 // Wake the blocked syncer thread in MakeSynchronousPost. |
295 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! | 296 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! |
296 http_post_completed_.Signal(); | 297 http_post_completed_.Signal(); |
297 } | 298 } |
298 | 299 |
299 } // namespace browser_sync | 300 } // namespace browser_sync |
OLD | NEW |