OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 baseline_context_getter_ = NULL; | 36 baseline_context_getter_ = NULL; |
37 } | 37 } |
38 | 38 |
39 // Apply the user agent which was set earlier. | 39 // Apply the user agent which was set earlier. |
40 if (is_user_agent_set()) | 40 if (is_user_agent_set()) |
41 context_->set_user_agent(user_agent_); | 41 context_->set_user_agent(user_agent_); |
42 | 42 |
43 return context_; | 43 return context_; |
44 } | 44 } |
45 | 45 |
46 scoped_refptr<MessageLoopProxy> | 46 scoped_refptr<base::MessageLoopProxy> |
47 HttpBridge::RequestContextGetter::GetIOMessageLoopProxy() { | 47 HttpBridge::RequestContextGetter::GetIOMessageLoopProxy() { |
48 return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO); | 48 return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO); |
49 } | 49 } |
50 | 50 |
51 HttpBridgeFactory::HttpBridgeFactory( | 51 HttpBridgeFactory::HttpBridgeFactory( |
52 URLRequestContextGetter* baseline_context_getter) { | 52 URLRequestContextGetter* baseline_context_getter) { |
53 DCHECK(baseline_context_getter != NULL); | 53 DCHECK(baseline_context_getter != NULL); |
54 request_context_getter_ = | 54 request_context_getter_ = |
55 new HttpBridge::RequestContextGetter(baseline_context_getter); | 55 new HttpBridge::RequestContextGetter(baseline_context_getter); |
56 } | 56 } |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. | 236 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. |
237 MessageLoop::current()->DeleteSoon(FROM_HERE, url_poster_); | 237 MessageLoop::current()->DeleteSoon(FROM_HERE, url_poster_); |
238 url_poster_ = NULL; | 238 url_poster_ = NULL; |
239 | 239 |
240 // Wake the blocked syncer thread in MakeSynchronousPost. | 240 // Wake the blocked syncer thread in MakeSynchronousPost. |
241 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! | 241 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! |
242 http_post_completed_.Signal(); | 242 http_post_completed_.Signal(); |
243 } | 243 } |
244 | 244 |
245 } // namespace browser_sync | 245 } // namespace browser_sync |
OLD | NEW |