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

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

Issue 2860008: Add sync requests to NetLog. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge. Created 10 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // cookies, sync will start failing. Also it seems like accept_lang/charset 94 // cookies, sync will start failing. Also it seems like accept_lang/charset
95 // should be tied to whatever the sync servers expect (if anything). These 95 // should be tied to whatever the sync servers expect (if anything). These
96 // fields should probably just be settable by sync backend; though we should 96 // fields should probably just be settable by sync backend; though we should
97 // figure out if we need to give the user explicit control over policies etc. 97 // figure out if we need to give the user explicit control over policies etc.
98 accept_language_ = baseline_context->accept_language(); 98 accept_language_ = baseline_context->accept_language();
99 accept_charset_ = baseline_context->accept_charset(); 99 accept_charset_ = baseline_context->accept_charset();
100 100
101 // We default to the browser's user agent. This can (and should) be overridden 101 // We default to the browser's user agent. This can (and should) be overridden
102 // with set_user_agent. 102 // with set_user_agent.
103 user_agent_ = webkit_glue::GetUserAgent(GURL()); 103 user_agent_ = webkit_glue::GetUserAgent(GURL());
104
105 net_log_ = baseline_context->net_log();
104 } 106 }
105 107
106 HttpBridge::RequestContext::~RequestContext() { 108 HttpBridge::RequestContext::~RequestContext() {
107 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 109 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
108 delete http_transaction_factory_; 110 delete http_transaction_factory_;
109 } 111 }
110 112
111 HttpBridge::HttpBridge(HttpBridge::RequestContextGetter* context_getter) 113 HttpBridge::HttpBridge(HttpBridge::RequestContextGetter* context_getter)
112 : context_getter_for_request_(context_getter), 114 : context_getter_for_request_(context_getter),
113 url_poster_(NULL), 115 url_poster_(NULL),
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. 238 // URLFetcher, so it seems most natural / "polite" to let the stack unwind.
237 MessageLoop::current()->DeleteSoon(FROM_HERE, url_poster_); 239 MessageLoop::current()->DeleteSoon(FROM_HERE, url_poster_);
238 url_poster_ = NULL; 240 url_poster_ = NULL;
239 241
240 // Wake the blocked syncer thread in MakeSynchronousPost. 242 // Wake the blocked syncer thread in MakeSynchronousPost.
241 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! 243 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted!
242 http_post_completed_.Signal(); 244 http_post_completed_.Signal();
243 } 245 }
244 246
245 } // namespace browser_sync 247 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698