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

Unified Diff: chrome/utility/shell_handler_impl_win.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location Created 3 years, 7 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 | « chrome/utility/importer/ie_importer_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/shell_handler_impl_win.cc
diff --git a/chrome/utility/shell_handler_impl_win.cc b/chrome/utility/shell_handler_impl_win.cc
index fc29fa89067947df0cd3c68cbe3b2c303d954d55..33119500ffa2c1e1a0d713f25837f312aaad4ac2 100644
--- a/chrome/utility/shell_handler_impl_win.cc
+++ b/chrome/utility/shell_handler_impl_win.cc
@@ -4,6 +4,7 @@
#include "chrome/utility/shell_handler_impl_win.h"
+#include <objbase.h>
#include <shldisp.h>
#include "base/files/file_enumerator.h"
@@ -88,7 +89,8 @@ bool IsPinnedToTaskbarHelper::ShortcutHasUnpinToTaskbarVerb(
base::win::ScopedComPtr<IShellDispatch> shell_dispatch;
HRESULT hresult =
- shell_dispatch.CreateInstance(CLSID_Shell, nullptr, CLSCTX_INPROC_SERVER);
+ ::CoCreateInstance(CLSID_Shell, nullptr, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&shell_dispatch));
if (FAILED(hresult) || !shell_dispatch) {
error_occured_ = true;
return false;
« no previous file with comments | « chrome/utility/importer/ie_importer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698