summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/http_bridge.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:27:09 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:27:09 +0000
commitef2bf421b04de3134cd7c02aac40a5565ef24dd9 (patch)
tree5bf90cca0bd015c23e843614ebf2e9f99cb8cd99 /chrome/browser/sync/glue/http_bridge.h
parent280e9b5d4b2fb0fe14824e526521710a658bce56 (diff)
downloadchromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.zip
chromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.tar.gz
chromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.tar.bz2
Stop refcounting URLRequestContext.
While doing so, fix a few issues with the code like ordering of URLRequestContext to ensure correct destruction order. Also fix const correctness in some places. BUG=58859 TEST=none TBR=willchan Review URL: https://chromiumcodereview.appspot.com/10299002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/http_bridge.h')
-rw-r--r--chrome/browser/sync/glue/http_bridge.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h
index 3e7e98e..a26410d 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);
};