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

Side by Side Diff: chrome/browser/ui/views/shell_dialogs_win.cc

Issue 8427007: Thread::Stop() must be called before any subclass's destructor completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest version as trybot-ted Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/shell_dialogs.h" 5 #include "chrome/browser/ui/shell_dialogs.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 } // namespace 378 } // namespace
379 379
380 // Helpers to show certain types of Windows shell dialogs in a way that doesn't 380 // Helpers to show certain types of Windows shell dialogs in a way that doesn't
381 // block the UI of the entire app. 381 // block the UI of the entire app.
382 382
383 class ShellDialogThread : public base::Thread { 383 class ShellDialogThread : public base::Thread {
384 public: 384 public:
385 ShellDialogThread() : base::Thread("Chrome_ShellDialogThread") { } 385 ShellDialogThread() : base::Thread("Chrome_ShellDialogThread") { }
386 ~ShellDialogThread() {
387 Stop();
388 }
386 389
387 protected: 390 protected:
388 void Init() { 391 void Init() {
389 // Initializes the COM library on the current thread. 392 // Initializes the COM library on the current thread.
390 CoInitialize(NULL); 393 CoInitialize(NULL);
391 } 394 }
392 395
393 void CleanUp() { 396 void CleanUp() {
394 // Closes the COM library on the current thread. CoInitialize must 397 // Closes the COM library on the current thread. CoInitialize must
395 // be balanced by a corresponding call to CoUninitialize. 398 // be balanced by a corresponding call to CoUninitialize.
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 } 954 }
952 } 955 }
953 } 956 }
954 return success; 957 return success;
955 } 958 }
956 959
957 // static 960 // static
958 SelectFileDialog* SelectFileDialog::Create(Listener* listener) { 961 SelectFileDialog* SelectFileDialog::Create(Listener* listener) {
959 return new SelectFileDialogImpl(listener); 962 return new SelectFileDialogImpl(listener);
960 } 963 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker.cc ('k') | chrome/default_plugin/plugin_install_job_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698