summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 00:01:41 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 00:01:41 +0000
commit2a92cd9469247921bda75f3d5a00a67f7bfd78eb (patch)
treecc54fa4a3805a540398f0b23c4f3597ec99b58f5 /chrome/browser/io_thread.h
parent032dea757076b465d613314736095ce82c542c1b (diff)
downloadchromium_src-2a92cd9469247921bda75f3d5a00a67f7bfd78eb.zip
chromium_src-2a92cd9469247921bda75f3d5a00a67f7bfd78eb.tar.gz
chromium_src-2a92cd9469247921bda75f3d5a00a67f7bfd78eb.tar.bz2
Make sure the "cancel leaked host resolver requests shutdown hack" gets run before the message loop is destroyed.
BUG=41966 Review URL: http://codereview.chromium.org/1798001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.h')
-rw-r--r--chrome/browser/io_thread.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index 3860690..a2860ac 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -61,6 +61,7 @@ class IOThread : public BrowserProcessSubThread {
protected:
virtual void Init();
+ virtual void CleanUp();
virtual void CleanUpAfterMessageLoopDestruction();
private:
@@ -78,13 +79,19 @@ class IOThread : public BrowserProcessSubThread {
// These member variables are basically global, but their lifetimes are tied
// to the IOThread. IOThread owns them all, despite not using scoped_ptr.
// This is because the destructor of IOThread runs on the wrong thread. All
- // member variables should be deleted in CleanUp().
+ // member variables should be deleted in CleanUp(), except ChromeNetLog
+ // which is deleted later in CleanUpAfterMessageLoopDestruction().
// These member variables are initialized in Init() and do not change for the
// lifetime of the IO thread.
Globals* globals_;
+ // This variable is only meaningful during shutdown. It is used to defer
+ // deletion of the NetLog to CleanUpAfterMessageLoopDestruction() even
+ // though |globals_| is reset by CleanUp().
+ scoped_ptr<ChromeNetLog> deferred_net_log_to_delete_;
+
// These member variables are initialized by a task posted to the IO thread,
// which gets posted by calling certain member functions of IOThread.