Chromium Code Reviews| Index: ui/base/dialogs/base_shell_dialog_win.cc |
| =================================================================== |
| --- ui/base/dialogs/base_shell_dialog_win.cc (revision 162015) |
| +++ ui/base/dialogs/base_shell_dialog_win.cc (working copy) |
| @@ -9,38 +9,6 @@ |
| #include "base/threading/thread.h" |
| #include "base/win/scoped_com_initializer.h" |
| -namespace { |
| - |
| -// Helpers to show certain types of Windows shell dialogs in a way that doesn't |
| -// block the UI of the entire app. |
| -class ShellDialogThread : public base::Thread { |
| - public: |
| - ShellDialogThread() : base::Thread("Chrome_ShellDialogThread") { } |
| - ~ShellDialogThread(); |
| - |
| - private: |
| - void Init(); |
| - void CleanUp(); |
| - |
| - scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(ShellDialogThread); |
| -}; |
| - |
| -ShellDialogThread::~ShellDialogThread() { |
| - Stop(); |
| -} |
| - |
| -void ShellDialogThread::Init() { |
| - com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
| -} |
| - |
| -void ShellDialogThread::CleanUp() { |
| - com_initializer_.reset(); |
| -} |
| - |
| -} // namespace |
| - |
| namespace ui { |
| // static |
| @@ -95,7 +63,10 @@ |
| // static |
| base::Thread* BaseShellDialogImpl::CreateDialogThread() { |
| - base::Thread* thread = new ShellDialogThread; |
| + base::Thread* thread = new base::Thread("Chrome_ShellDialogThread"); |
| +#if defined(OS_WIN) |
|
grt (UTC plus 2)
2012/10/16 01:58:13
_win.cc here, too
|
| + thread->init_com_with_mta(false); |
| +#endif |
| bool started = thread->Start(); |
| DCHECK(started); |
| return thread; |