diff options
Diffstat (limited to 'chrome/browser/io_thread.h')
-rw-r--r-- | chrome/browser/io_thread.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index 779f4d4..6bdd01b 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_IO_THREAD_H_ #pragma once +#include <list> #include <string> #include "base/basictypes.h" #include "base/memory/ref_counted.h" @@ -116,6 +117,21 @@ class IOThread : public BrowserProcessSubThread { base::ListValue* referral_list, bool preconnect_enabled); + // Registers |url_request_context_getter| into the IO thread. During + // IOThread::CleanUp(), IOThread will iterate through known getters and + // release their URLRequestContexts. Only called on the IO thread. It does + // not acquire a refcount for |url_request_context_getter|. If + // |url_request_context_getter| is being deleted before IOThread::CleanUp() is + // invoked, then this needs to be balanced with a call to + // UnregisterURLRequestContextGetter(). + void RegisterURLRequestContextGetter( + ChromeURLRequestContextGetter* url_request_context_getter); + + // Unregisters |url_request_context_getter| from the IO thread. Only called + // on the IO thread. + void UnregisterURLRequestContextGetter( + ChromeURLRequestContextGetter* url_request_context_getter); + // Handles changing to On The Record mode, discarding confidential data. void ChangedToOnTheRecord(); @@ -218,6 +234,11 @@ class IOThread : public BrowserProcessSubThread { scoped_refptr<net::URLRequestContextGetter> system_url_request_context_getter_; + // Keeps track of all live ChromeURLRequestContextGetters, so the + // ChromeURLRequestContexts can be released during + // IOThread::CleanUp(). + std::list<ChromeURLRequestContextGetter*> url_request_context_getters_; + ScopedRunnableMethodFactory<IOThread> method_factory_; DISALLOW_COPY_AND_ASSIGN(IOThread); |