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

Side by Side Diff: chrome/browser/sync/glue/http_bridge.cc

Issue 1837003: Created a stock implementation of the MessageLoopProxy interface than can be ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Rearranged header files Created 10 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | chrome/browser/sync/glue/http_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698