diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 21:15:58 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 21:15:58 +0000 |
commit | 5d391c8d58c770e35379ce475b1831cab6e79799 (patch) | |
tree | fc666618c81d0481c67e9ebd79c356a9336e5af9 | |
parent | 0a470f7277ae06bf847075fa7b05fec5d9b97560 (diff) | |
download | chromium_src-5d391c8d58c770e35379ce475b1831cab6e79799.zip chromium_src-5d391c8d58c770e35379ce475b1831cab6e79799.tar.gz chromium_src-5d391c8d58c770e35379ce475b1831cab6e79799.tar.bz2 |
Make sure ImportantFileWriter is used on the right thread by TransportSecurityPersister.
This requires always destroying TSP on the UI thread,
because it's created on the UI thread.
BUG=96610
Review URL: http://codereview.chromium.org/7904022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101377 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/transport_security_persister.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/transport_security_persister.h b/chrome/browser/transport_security_persister.h index c7e9ce0..96bde66 100644 --- a/chrome/browser/transport_security_persister.h +++ b/chrome/browser/transport_security_persister.h @@ -39,10 +39,12 @@ #include "base/file_path.h" #include "base/memory/ref_counted.h" #include "chrome/common/important_file_writer.h" +#include "content/browser/browser_thread.h" #include "net/base/transport_security_state.h" class TransportSecurityPersister - : public base::RefCountedThreadSafe<TransportSecurityPersister>, + : public base::RefCountedThreadSafe<TransportSecurityPersister, + BrowserThread::DeleteOnUIThread>, public net::TransportSecurityState::Delegate, public ImportantFileWriter::DataSerializer { public: @@ -61,7 +63,8 @@ class TransportSecurityPersister virtual bool SerializeData(std::string* data); private: - friend class base::RefCountedThreadSafe<TransportSecurityPersister>; + friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; + friend class DeleteTask<TransportSecurityPersister>; virtual ~TransportSecurityPersister(); |