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

Unified Diff: chrome/browser/profiles/profile_io_data.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/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.h
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index bc10f01fd95ea9cf36001ecd6f05c03980a71a67..f4702bbb65673bba496ececdeda67c292c177537 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -74,11 +74,11 @@ class ProfileIOData {
// These should only be called at most once each. Ownership is reversed when
// they get called, from ProfileIOData owning ChromeURLRequestContext to vice
// versa.
- scoped_refptr<ChromeURLRequestContext> GetMainRequestContext() const;
- scoped_refptr<ChromeURLRequestContext> GetMediaRequestContext() const;
- scoped_refptr<ChromeURLRequestContext> GetExtensionsRequestContext() const;
- scoped_refptr<ChromeURLRequestContext> GetIsolatedAppRequestContext(
- scoped_refptr<ChromeURLRequestContext> main_context,
+ ChromeURLRequestContext* GetMainRequestContext() const;
+ ChromeURLRequestContext* GetMediaRequestContext() const;
+ ChromeURLRequestContext* GetExtensionsRequestContext() const;
+ ChromeURLRequestContext* GetIsolatedAppRequestContext(
+ ChromeURLRequestContext* main_context,
const std::string& app_id) const;
// These are useful when the Chrome layer is called from the content layer
@@ -225,7 +225,7 @@ class ProfileIOData {
chrome_browser_net::HttpServerPropertiesManager* manager) const;
ChromeURLRequestContext* main_request_context() const {
- return main_request_context_;
+ return main_request_context_.get();
}
// Destroys the ResourceContext first, to cancel any URLRequests that are
@@ -254,7 +254,7 @@ class ProfileIOData {
net::URLRequestContext* request_context_;
};
- typedef base::hash_map<std::string, scoped_refptr<ChromeURLRequestContext> >
+ typedef base::hash_map<std::string, ChromeURLRequestContext*>
AppRequestContextMap;
// --------------------------------------------
@@ -267,17 +267,17 @@ class ProfileIOData {
// Does an on-demand initialization of a RequestContext for the given
// isolated app.
- virtual scoped_refptr<ChromeURLRequestContext> InitializeAppRequestContext(
- scoped_refptr<ChromeURLRequestContext> main_context,
+ virtual ChromeURLRequestContext* InitializeAppRequestContext(
+ ChromeURLRequestContext* main_context,
const std::string& app_id) const = 0;
// These functions are used to transfer ownership of the lazily initialized
// context from ProfileIOData to the URLRequestContextGetter.
- virtual scoped_refptr<ChromeURLRequestContext>
+ virtual ChromeURLRequestContext*
AcquireMediaRequestContext() const = 0;
- virtual scoped_refptr<ChromeURLRequestContext>
+ virtual ChromeURLRequestContext*
AcquireIsolatedAppRequestContext(
- scoped_refptr<ChromeURLRequestContext> main_context,
+ ChromeURLRequestContext* main_context,
const std::string& app_id) const = 0;
// The order *DOES* matter for the majority of these member variables, so
@@ -341,8 +341,8 @@ class ProfileIOData {
// These are only valid in between LazyInitialize() and their accessor being
// called.
- mutable scoped_refptr<ChromeURLRequestContext> main_request_context_;
- mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_;
+ mutable scoped_ptr<ChromeURLRequestContext> main_request_context_;
+ mutable scoped_ptr<ChromeURLRequestContext> extensions_request_context_;
// One AppRequestContext per isolated app.
mutable AppRequestContextMap app_request_context_map_;
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698