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

Unified Diff: chrome/browser/google/google_update_win.cc

Issue 2792173003: Remove ScopedComPtr::iid() (Closed)
Patch Set: Created 3 years, 9 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 | « base/win/scoped_comptr_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_update_win.cc
diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc
index a0b869899e73008df0090ee5959df8a763aa1752..91939e0ce6e3fff85c1593e79ff4e41d74b61dc8 100644
--- a/chrome/browser/google/google_update_win.cc
+++ b/chrome/browser/google/google_update_win.cc
@@ -6,6 +6,7 @@
#include <atlbase.h>
#include <atlcom.h>
+#include <objbase.h>
#include <stdint.h>
#include <string.h>
@@ -126,9 +127,9 @@ void ConfigureProxyBlanket(IUnknown* interface_pointer) {
// Vista+. |hwnd| must refer to a foregound window in order to get the UAC
// prompt to appear in the foreground if running on Vista+. It can also be NULL
// if background UAC prompts are desired.
-HRESULT CoGetClassObjectAsAdmin(REFCLSID class_id,
+HRESULT CoGetClassObjectAsAdmin(gfx::AcceleratedWidget hwnd,
+ REFCLSID class_id,
REFIID interface_id,
- gfx::AcceleratedWidget hwnd,
void** interface_ptr) {
if (!interface_ptr)
return E_POINTER;
@@ -182,24 +183,19 @@ HRESULT CreateGoogleUpdate3WebClass(
!install_update_if_possible ||
!IsElevationRequiredForSystemLevelUpdates()) {
hresult = ::CoGetClassObject(google_update_clsid, CLSCTX_ALL, nullptr,
- base::win::ScopedComPtr<IClassFactory>::iid(),
- class_factory.ReceiveVoid());
+ IID_PPV_ARGS(&class_factory));
} else {
// With older versions of GoogleUpdate, a system-level update requires Admin
// privileges. Elevate while instantiating the MachineClass.
- hresult = CoGetClassObjectAsAdmin(
- google_update_clsid, base::win::ScopedComPtr<IClassFactory>::iid(),
- elevation_window, class_factory.ReceiveVoid());
+ hresult = CoGetClassObjectAsAdmin(elevation_window, google_update_clsid,
+ IID_PPV_ARGS(&class_factory));
}
if (FAILED(hresult))
return hresult;
ConfigureProxyBlanket(class_factory.get());
- return class_factory->CreateInstance(
- nullptr,
- base::win::ScopedComPtr<IGoogleUpdate3Web>::iid(),
- google_update->ReceiveVoid());
+ return class_factory->CreateInstance(nullptr, IID_PPV_ARGS(google_update));
}
// UpdateCheckDriver -----------------------------------------------------------
« no previous file with comments | « base/win/scoped_comptr_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698