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

Side by Side Diff: components/update_client/background_downloader_win.cc

Issue 2830893004: Migrate IID Coupled Uses of ScopedComPtr::ReceiveVoid() to IID_PPV_ARGS (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/update_client/background_downloader_win.h" 5 #include "components/update_client/background_downloader_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <objbase.h>
9 #include <stddef.h> 10 #include <stddef.h>
10 11
11 #include <stdint.h> 12 #include <stdint.h>
12 #include <functional> 13 #include <functional>
13 #include <iomanip> 14 #include <iomanip>
14 #include <limits> 15 #include <limits>
15 #include <memory> 16 #include <memory>
16 #include <utility> 17 #include <utility>
17 #include <vector> 18 #include <vector>
18 19
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 HRESULT GetGit(ScopedComPtr<IGlobalInterfaceTable>* git) { 134 HRESULT GetGit(ScopedComPtr<IGlobalInterfaceTable>* git) {
134 return git->CreateInstance(CLSID_StdGlobalInterfaceTable, NULL, 135 return git->CreateInstance(CLSID_StdGlobalInterfaceTable, NULL,
135 CLSCTX_INPROC_SERVER); 136 CLSCTX_INPROC_SERVER);
136 } 137 }
137 138
138 // Retrieves an interface pointer from the process GIT for a given |cookie|. 139 // Retrieves an interface pointer from the process GIT for a given |cookie|.
139 template <typename T> 140 template <typename T>
140 HRESULT GetInterfaceFromGit(const ScopedComPtr<IGlobalInterfaceTable>& git, 141 HRESULT GetInterfaceFromGit(const ScopedComPtr<IGlobalInterfaceTable>& git,
141 DWORD cookie, 142 DWORD cookie,
142 ScopedComPtr<T>* p) { 143 ScopedComPtr<T>* p) {
143 return git->GetInterfaceFromGlobal(cookie, __uuidof(T), p->ReceiveVoid()); 144 return git->GetInterfaceFromGlobal(cookie, IID_PPV_ARGS(p));
144 } 145 }
145 146
146 // Registers an interface pointer in GIT and returns its corresponding |cookie|. 147 // Registers an interface pointer in GIT and returns its corresponding |cookie|.
147 template <typename T> 148 template <typename T>
148 HRESULT RegisterInterfaceInGit(const ScopedComPtr<IGlobalInterfaceTable>& git, 149 HRESULT RegisterInterfaceInGit(const ScopedComPtr<IGlobalInterfaceTable>& git,
149 const ScopedComPtr<T>& p, 150 const ScopedComPtr<T>& p,
150 DWORD* cookie) { 151 DWORD* cookie) {
151 return git->RegisterInterfaceInGlobal(p.Get(), __uuidof(T), cookie); 152 return git->RegisterInterfaceInGlobal(p.Get(), __uuidof(T), cookie);
152 } 153 }
153 154
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 876
876 for (auto cookie : cookies) { 877 for (auto cookie : cookies) {
877 // TODO(sorin): check the result of the call, see crbug.com/644857. 878 // TODO(sorin): check the result of the call, see crbug.com/644857.
878 git->RevokeInterfaceFromGlobal(cookie); 879 git->RevokeInterfaceFromGlobal(cookie);
879 } 880 }
880 881
881 return S_OK; 882 return S_OK;
882 } 883 }
883 884
884 } // namespace update_client 885 } // namespace update_client
OLDNEW
« no previous file with comments | « chrome/browser/win/jumplist_updater.cc ('k') | device/generic_sensor/platform_sensor_and_provider_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698