Chromium Code Reviews| Index: chrome/browser/file_select_helper.h |
| diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h |
| index f0669eb90bd8c97ca24702f159834fee8fb9c38c..0e647e1c72c2a6f525bcb8816f7550d90bec5fe3 100644 |
| --- a/chrome/browser/file_select_helper.h |
| +++ b/chrome/browser/file_select_helper.h |
| @@ -13,6 +13,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "build/build_config.h" |
| +#include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/web_contents_observer.h" |
| @@ -39,12 +40,13 @@ struct SelectedFileInfo; |
| // This class handles file-selection requests coming from WebUI elements |
| // (via the extensions::ExtensionHost class). It implements both the |
| // initialisation and listener functions for file-selection dialogs. |
| -class FileSelectHelper : public base::RefCountedThreadSafe<FileSelectHelper>, |
| +class FileSelectHelper : public base::RefCountedThreadSafe< |
| + FileSelectHelper, |
| + content::BrowserThread::DeleteOnUIThread>, |
|
sky
2016/01/21 18:06:27
Please add a comment as to why this needs to be de
|
| public ui::SelectFileDialog::Listener, |
| public content::WebContentsObserver, |
| public content::NotificationObserver { |
| public: |
| - |
| // Show the file chooser dialog. |
| static void RunFileChooser(content::WebContents* tab, |
| const content::FileChooserParams& params); |
| @@ -56,6 +58,10 @@ class FileSelectHelper : public base::RefCountedThreadSafe<FileSelectHelper>, |
| private: |
| friend class base::RefCountedThreadSafe<FileSelectHelper>; |
| + friend class base::DeleteHelper<FileSelectHelper>; |
| + friend struct content::BrowserThread::DeleteOnThread< |
| + content::BrowserThread::UI>; |
| + |
| FRIEND_TEST_ALL_PREFIXES(FileSelectHelperTest, IsAcceptTypeValid); |
| FRIEND_TEST_ALL_PREFIXES(FileSelectHelperTest, ZipPackage); |
| FRIEND_TEST_ALL_PREFIXES(FileSelectHelperTest, GetSanitizedFileName); |