summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/chrome_url_request_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/net/chrome_url_request_context.h')
-rw-r--r--chrome/browser/net/chrome_url_request_context.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index be9f5e3..31a41d3 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -29,6 +29,11 @@ class ProfileIOData;
class ChromeURLRequestContext : public net::URLRequestContext {
public:
ChromeURLRequestContext();
+ virtual ~ChromeURLRequestContext();
+
+ base::WeakPtr<ChromeURLRequestContext> GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+ }
// Copies the state from |other| into this context.
void CopyFrom(ChromeURLRequestContext* other);
@@ -56,10 +61,9 @@ class ChromeURLRequestContext : public net::URLRequestContext {
// Callback for when the default charset changes.
void OnDefaultCharsetChange(const std::string& default_charset);
- protected:
- virtual ~ChromeURLRequestContext();
-
private:
+ base::WeakPtrFactory<ChromeURLRequestContext> weak_factory_;
+
// ---------------------------------------------------------------------------
// Important: When adding any new members below, consider whether they need to
// be added to CopyFrom.
@@ -177,10 +181,10 @@ class ChromeURLRequestContextGetter : public net::URLRequestContextGetter,
// Access only from the IO thread.
scoped_ptr<ChromeURLRequestContextFactory> factory_;
- // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext
+ // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext
// instance that was lazily created by GetURLRequestContext().
// Access only from the IO thread.
- base::WeakPtr<net::URLRequestContext> url_request_context_;
+ base::WeakPtr<ChromeURLRequestContext> url_request_context_;
DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter);
};