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

Unified Diff: chrome/browser/win/jumplist_updater.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/browser/ui/views/tabs/window_finder_win.cc ('k') | chrome/browser/win/settings_app_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist_updater.cc
diff --git a/chrome/browser/win/jumplist_updater.cc b/chrome/browser/win/jumplist_updater.cc
index e5ca674f29457ee732334330e57fc81089b6ee91..529fd62312bdb33063b88ef13c8594fec5f1511d 100644
--- a/chrome/browser/win/jumplist_updater.cc
+++ b/chrome/browser/win/jumplist_updater.cc
@@ -28,8 +28,8 @@ bool AddShellLink(base::win::ScopedComPtr<IObjectCollection> collection,
scoped_refptr<ShellLinkItem> item) {
// Create an IShellLink object.
base::win::ScopedComPtr<IShellLink> link;
- HRESULT result = link.CreateInstance(CLSID_ShellLink, NULL,
- CLSCTX_INPROC_SERVER);
+ HRESULT result = ::CoCreateInstance(
+ CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&link));
if (FAILED(result))
return false;
@@ -125,8 +125,9 @@ bool JumpListUpdater::BeginUpdate() {
return false;
// Create an ICustomDestinationList object and attach it to our application.
- HRESULT result = destination_list_.CreateInstance(CLSID_DestinationList, NULL,
- CLSCTX_INPROC_SERVER);
+ HRESULT result =
+ ::CoCreateInstance(CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&destination_list_));
if (FAILED(result))
return false;
@@ -177,8 +178,9 @@ bool JumpListUpdater::AddTasks(const ShellLinkItemList& link_items) {
// Create an EnumerableObjectCollection object to be added items of the
// "Task" category.
base::win::ScopedComPtr<IObjectCollection> collection;
- HRESULT result = collection.CreateInstance(CLSID_EnumerableObjectCollection,
- NULL, CLSCTX_INPROC_SERVER);
+ HRESULT result =
+ ::CoCreateInstance(CLSID_EnumerableObjectCollection, NULL,
+ CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&collection));
if (FAILED(result))
return false;
@@ -225,8 +227,9 @@ bool JumpListUpdater::AddCustomCategory(const base::string16& category_name,
// We once add the given items to this collection object and add this
// collection to the JumpList.
base::win::ScopedComPtr<IObjectCollection> collection;
- HRESULT result = collection.CreateInstance(CLSID_EnumerableObjectCollection,
- NULL, CLSCTX_INPROC_SERVER);
+ HRESULT result =
+ ::CoCreateInstance(CLSID_EnumerableObjectCollection, NULL,
+ CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&collection));
if (FAILED(result))
return false;
« no previous file with comments | « chrome/browser/ui/views/tabs/window_finder_win.cc ('k') | chrome/browser/win/settings_app_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698