diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:04:07 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:04:07 +0000 |
commit | 530f43f302f1eef9d3530767015891f1db1f1272 (patch) | |
tree | 2006b20ca4022116b5d8c04784cec8802fb4d262 /chrome/common | |
parent | 0b9158f07ac7c5ed1dc1c166e4a1513d6fbbb9e9 (diff) | |
download | chromium_src-530f43f302f1eef9d3530767015891f1db1f1272.zip chromium_src-530f43f302f1eef9d3530767015891f1db1f1272.tar.gz chromium_src-530f43f302f1eef9d3530767015891f1db1f1272.tar.bz2 |
Use ScopedComPtr instead of CComPtr to reduce a dependency on ATL.
BUG=5027
TEST=none
Review URL: http://codereview.chromium.org/201012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/platform_util_win.cc | 7 | ||||
-rw-r--r-- | chrome/common/win_safe_util.cc | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc index b602388..68cc839 100644 --- a/chrome/common/platform_util_win.cc +++ b/chrome/common/platform_util_win.cc @@ -4,8 +4,6 @@ #include "chrome/common/platform_util.h" -#include <atlbase.h> -#include <atlapp.h> #include <commdlg.h> #include <dwmapi.h> #include <shellapi.h> @@ -17,6 +15,7 @@ #include "base/gfx/native_widget_types.h" #include "base/logging.h" #include "base/registry.h" +#include "base/scoped_comptr_win.h" #include "base/string_util.h" #include "googleurl/src/gurl.h" @@ -58,8 +57,8 @@ void ShowItemInFolder(const FilePath& full_path) { return; } - CComPtr<IShellFolder> desktop; - HRESULT hr = SHGetDesktopFolder(&desktop); + ScopedComPtr<IShellFolder> desktop; + HRESULT hr = SHGetDesktopFolder(desktop.Receive()); if (FAILED(hr)) return; diff --git a/chrome/common/win_safe_util.cc b/chrome/common/win_safe_util.cc index 53cc9b2..f215566 100644 --- a/chrome/common/win_safe_util.cc +++ b/chrome/common/win_safe_util.cc @@ -4,7 +4,6 @@ #include <shlobj.h> #include <shobjidl.h> -#include <atlcomcli.h> #include "chrome/common/win_safe_util.h" @@ -12,6 +11,7 @@ #include "base/file_path.h" #include "base/logging.h" #include "base/path_service.h" +#include "base/scoped_comptr_win.h" #include "base/string_util.h" namespace win_util { @@ -24,8 +24,8 @@ namespace win_util { bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title, const FilePath& full_path, const std::wstring& source_url) { - ATL::CComPtr<IAttachmentExecute> attachment_services; - HRESULT hr = attachment_services.CoCreateInstance(CLSID_AttachmentServices); + ScopedComPtr<IAttachmentExecute> attachment_services; + HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices); if (FAILED(hr)) { // We don't have Attachment Execution Services, it must be a pre-XP.SP2 // Windows installation, or the thread does not have COM initialized. |