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

Unified Diff: chrome/browser/first_run/upgrade_util_win.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
Index: chrome/browser/first_run/upgrade_util_win.cc
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index de4f06749ead0004e8d969172f2432f90d87d1b9..dd94ce057901670732d9d4db8f1ed41536175a11 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/first_run/upgrade_util.h"
#include <windows.h>
+#include <objbase.h>
#include <psapi.h>
#include <shellapi.h>
@@ -54,7 +55,8 @@ bool GetNewerChromeFile(base::FilePath* path) {
bool InvokeGoogleUpdateForRename() {
#if defined(GOOGLE_CHROME_BUILD)
base::win::ScopedComPtr<IProcessLauncher> ipl;
- if (!FAILED(ipl.CreateInstance(__uuidof(ProcessLauncherClass)))) {
+ if (!FAILED(::CoCreateInstance(__uuidof(ProcessLauncherClass), nullptr,
+ CLSCTX_ALL, IID_PPV_ARGS(&ipl)))) {
ULONG_PTR phandle = NULL;
DWORD id = GetCurrentProcessId();
if (!FAILED(ipl->LaunchCmdElevated(install_static::GetAppGuid(),
« no previous file with comments | « chrome/browser/download/download_status_updater_win.cc ('k') | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698