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

Unified Diff: components/update_client/background_downloader_win.cc

Issue 2850683002: Remove ScopedComPtr::ReceiveVoid and Add ScopedComPtrRef (Closed)
Patch Set: Created 3 years, 8 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 4381098f3bce3d1a11f3cef614de6035d3a87ae0..152ad54cab88aca61bb38a17fcffe4ae102f7b7a 100644
--- a/components/update_client/background_downloader_win.cc
+++ b/components/update_client/background_downloader_win.cc
@@ -137,11 +137,11 @@ HRESULT GetGit(ScopedComPtr<IGlobalInterfaceTable>* git) {
}
// Retrieves an interface pointer from the process GIT for a given |cookie|.
-template <typename T>
-HRESULT GetInterfaceFromGit(const ScopedComPtr<IGlobalInterfaceTable>& git,
+HRESULT GetInterfaceFromGit(IGlobalInterfaceTable* git,
DWORD cookie,
- ScopedComPtr<T>* p) {
- return git->GetInterfaceFromGlobal(cookie, IID_PPV_ARGS(p));
+ REFIID riid,
+ void** ppv) {
+ return git->GetInterfaceFromGlobal(cookie, riid, ppv);
}
// Registers an interface pointer in GIT and returns its corresponding |cookie|.
@@ -843,12 +843,13 @@ HRESULT BackgroundDownloader::UpdateInterfacePointers() {
return hr;
bits_manager_ = nullptr;
- hr = GetInterfaceFromGit(git, git_cookie_bits_manager_, &bits_manager_);
+ hr = GetInterfaceFromGit(git.Get(), git_cookie_bits_manager_,
+ IID_PPV_ARGS(&bits_manager_));
if (FAILED(hr))
return hr;
job_ = nullptr;
- hr = GetInterfaceFromGit(git, git_cookie_job_, &job_);
+ hr = GetInterfaceFromGit(git.Get(), git_cookie_job_, IID_PPV_ARGS(&job_));
if (FAILED(hr))
return hr;

Powered by Google App Engine
This is Rietveld 408576698