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

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

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/sync/glue/http_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/http_bridge.h
diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h
index 3e7e98eda04aff997424c69eebae748cda1df228..a26410d2241d8d47eef2e29563c0f4b9956af6a1 100644
--- a/chrome/browser/sync/glue/http_bridge.h
+++ b/chrome/browser/sync/glue/http_bridge.h
@@ -51,6 +51,9 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
// currently active profile.
explicit RequestContext(net::URLRequestContext* baseline_context);
+ // The destructor MUST be called on the IO thread.
+ virtual ~RequestContext();
+
// Set the user agent for requests using this context. The default is
// the browser's UA string.
void set_user_agent(const std::string& ua) { user_agent_ = ua; }
@@ -63,9 +66,6 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
}
private:
- // The destructor MUST be called on the IO thread.
- virtual ~RequestContext();
-
std::string user_agent_;
net::URLRequestContext* baseline_context_;
@@ -96,7 +96,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
scoped_refptr<net::URLRequestContextGetter> baseline_context_getter_;
// Lazily initialized by GetURLRequestContext().
- scoped_refptr<RequestContext> context_;
+ scoped_ptr<RequestContext> context_;
DISALLOW_COPY_AND_ASSIGN(RequestContextGetter);
};
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/sync/glue/http_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698