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/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "content/public/common/content_client.h" | 11 #include "content/public/common/content_client.h" |
12 #include "content/public/common/url_fetcher.h" | 12 #include "content/public/common/url_fetcher.h" |
13 #include "net/base/cookie_monster.h" | 13 #include "net/base/cookie_monster.h" |
14 #include "net/base/host_resolver.h" | 14 #include "net/base/host_resolver.h" |
15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
17 #include "net/http/http_cache.h" | 17 #include "net/http/http_cache.h" |
18 #include "net/http/http_network_layer.h" | 18 #include "net/http/http_network_layer.h" |
19 #include "net/http/http_response_headers.h" | 19 #include "net/http/http_response_headers.h" |
20 #include "net/proxy/proxy_service.h" | 20 #include "net/proxy/proxy_service.h" |
21 #include "net/url_request/url_request_context.h" | 21 #include "net/url_request/url_request_context.h" |
22 #include "net/url_request/url_request_status.h" | 22 #include "net/url_request/url_request_status.h" |
23 | 23 |
| 24 using content::BrowserThread; |
| 25 |
24 namespace browser_sync { | 26 namespace browser_sync { |
25 | 27 |
26 HttpBridge::RequestContextGetter::RequestContextGetter( | 28 HttpBridge::RequestContextGetter::RequestContextGetter( |
27 net::URLRequestContextGetter* baseline_context_getter) | 29 net::URLRequestContextGetter* baseline_context_getter) |
28 : baseline_context_getter_(baseline_context_getter) { | 30 : baseline_context_getter_(baseline_context_getter) { |
29 } | 31 } |
30 | 32 |
31 net::URLRequestContext* | 33 net::URLRequestContext* |
32 HttpBridge::RequestContextGetter::GetURLRequestContext() { | 34 HttpBridge::RequestContextGetter::GetURLRequestContext() { |
33 // Lazily create the context. | 35 // Lazily create the context. |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. | 288 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. |
287 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); | 289 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); |
288 fetch_state_.url_poster = NULL; | 290 fetch_state_.url_poster = NULL; |
289 | 291 |
290 // Wake the blocked syncer thread in MakeSynchronousPost. | 292 // Wake the blocked syncer thread in MakeSynchronousPost. |
291 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! | 293 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! |
292 http_post_completed_.Signal(); | 294 http_post_completed_.Signal(); |
293 } | 295 } |
294 | 296 |
295 } // namespace browser_sync | 297 } // namespace browser_sync |
OLD | NEW |