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

Unified Diff: chrome/browser/sync/glue/http_bridge.cc

Issue 332006: Remove the restriction that ChromeURLRequestContextGetter needs to be release... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to latest changes Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/http_bridge.cc
===================================================================
--- chrome/browser/sync/glue/http_bridge.cc (revision 32405)
+++ chrome/browser/sync/glue/http_bridge.cc (working copy)
@@ -46,17 +46,9 @@
DCHECK(baseline_context_getter != NULL);
request_context_getter_ =
new HttpBridge::RequestContextGetter(baseline_context_getter);
- request_context_getter_->AddRef();
}
HttpBridgeFactory::~HttpBridgeFactory() {
- if (request_context_getter_) {
- // Clean up request context getter on IO thread.
- bool posted = ChromeThread::ReleaseSoon(
- ChromeThread::IO, FROM_HERE, request_context_getter_);
- DCHECK(posted);
- request_context_getter_ = NULL;
- }
}
sync_api::HttpPostProviderInterface* HttpBridgeFactory::Create() {
@@ -116,13 +108,9 @@
request_succeeded_(false),
http_response_code_(-1),
http_post_completed_(false, false) {
- context_getter_for_request_->AddRef();
}
HttpBridge::~HttpBridge() {
- bool posted = ChromeThread::ReleaseSoon(
- ChromeThread::IO, FROM_HERE, context_getter_for_request_);
- DCHECK(posted);
}
void HttpBridge::SetUserAgent(const char* user_agent) {
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698