diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 07:00:22 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 07:00:22 +0000 |
commit | b4966382d5d5b72c2fa1ba76aa045128eaf90418 (patch) | |
tree | f57004fa72e42181b6e3186528ca331ceb05cfd6 /chrome/common/chrome_paths_win.cc | |
parent | f44d1193f728c17cc4fd7adfe11a3fce82cddb9b (diff) | |
download | chromium_src-b4966382d5d5b72c2fa1ba76aa045128eaf90418.zip chromium_src-b4966382d5d5b72c2fa1ba76aa045128eaf90418.tar.gz chromium_src-b4966382d5d5b72c2fa1ba76aa045128eaf90418.tar.bz2 |
Move ScopedCoMem to base/win. This is to allow the class to be used from folders that aren't allowed to depend on chrome/common (and besides, ScopedCoMem belongs in base/win anyway).
I'm also adding a DCHECK to ScopedComInitializer that checks if the construction thread is the same as the destruction thread. The reason for this is that I've noticed cases where an instance is created on the heap (as opposed to the usual stack usecase) which could leave the door open to incorrect COM uninitialization.
Review URL: http://codereview.chromium.org/8354035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_win.cc')
-rw-r--r-- | chrome/common/chrome_paths_win.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc index e8cf7e0..f8a4b3a 100644 --- a/chrome/common/chrome_paths_win.cc +++ b/chrome/common/chrome_paths_win.cc @@ -12,8 +12,8 @@ #include "base/file_path.h" #include "base/path_service.h" +#include "base/win/scoped_co_mem.h" #include "chrome/common/chrome_constants.h" -#include "chrome/common/scoped_co_mem.h" #include "chrome/installer/util/browser_distribution.h" namespace chrome { @@ -71,7 +71,7 @@ bool GetUserDownloadsDirectory(FilePath* result) { REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR*); GetKnownFolderPath f = reinterpret_cast<GetKnownFolderPath>( GetProcAddress(GetModuleHandle(L"shell32.dll"), "SHGetKnownFolderPath")); - chrome::common::ScopedCoMem<wchar_t> path_buf; + base::win::ScopedCoMem<wchar_t> path_buf; if (f && SUCCEEDED(f(FOLDERID_Downloads, 0, NULL, &path_buf))) { *result = FilePath(std::wstring(path_buf)); return true; |