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

Unified Diff: components/update_client/background_downloader_win.cc

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (Closed)
Patch Set: 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
Index: components/update_client/background_downloader_win.cc
diff --git a/components/update_client/background_downloader_win.cc b/components/update_client/background_downloader_win.cc
index 5a0d089589712187787ee13292565d8abf76c493..2c3766ff1bd7a09925947b9d1a11e5f903728576 100644
--- a/components/update_client/background_downloader_win.cc
+++ b/components/update_client/background_downloader_win.cc
@@ -132,8 +132,9 @@ const int kPurgeStaleJobsIntervalBetweenChecksDays = 1;
// Retrieves the singleton instance of GIT for this process.
HRESULT GetGit(ScopedComPtr<IGlobalInterfaceTable>* git) {
- return git->CreateInstance(CLSID_StdGlobalInterfaceTable, NULL,
- CLSCTX_INPROC_SERVER);
+ return ::CoCreateInstance(CLSID_StdGlobalInterfaceTable, NULL,
+ CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(git->GetAddressOf()));
}
// Retrieves an interface pointer from the process GIT for a given |cookie|.
@@ -366,7 +367,8 @@ bool JobFileUrlEqual::operator()(IBackgroundCopyJob* job) const {
// Creates an instance of the BITS manager.
HRESULT CreateBitsManager(IBackgroundCopyManager** bits_manager) {
ScopedComPtr<IBackgroundCopyManager> object;
- HRESULT hr = object.CreateInstance(__uuidof(BackgroundCopyManager));
+ HRESULT hr = ::CoCreateInstance(__uuidof(BackgroundCopyManager), nullptr,
+ CLSCTX_ALL, IID_PPV_ARGS(&object));
if (FAILED(hr)) {
return hr;
}
« no previous file with comments | « components/storage_monitor/portable_device_watcher_win.cc ('k') | content/common/quarantine/quarantine_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698