Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: ui/base/dialogs/base_shell_dialog_win.cc

Issue 11048029: Allow Thread to initialize COM for Windows consumers who need it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/setup/daemon_controller_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dialogs/base_shell_dialog_win.cc
===================================================================
--- ui/base/dialogs/base_shell_dialog_win.cc (revision 163371)
+++ 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,8 @@
// static
base::Thread* BaseShellDialogImpl::CreateDialogThread() {
- base::Thread* thread = new ShellDialogThread;
+ base::Thread* thread = new base::Thread("Chrome_ShellDialogThread");
+ thread->init_com_with_mta(false);
bool started = thread->Start();
DCHECK(started);
return thread;
« no previous file with comments | « remoting/host/setup/daemon_controller_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698