summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-13 01:20:56 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-13 01:20:56 +0000
commitaed9efbf3abe5c155e3bbdd4735f221add54ba40 (patch)
treea473a5b2a2e2c3d3e1428a0bf3719e2a635dd44b /chrome_frame
parentef2ddd2b80066e94fec967dd3372e303af07134a (diff)
downloadchromium_src-aed9efbf3abe5c155e3bbdd4735f221add54ba40.zip
chromium_src-aed9efbf3abe5c155e3bbdd4735f221add54ba40.tar.gz
chromium_src-aed9efbf3abe5c155e3bbdd4735f221add54ba40.tar.bz2
Use ScopedBstr, ScopedComPtr, and ScopedVariant in place of raw or ATL objects.
Also, use ScopedComPtr::CreateInstance() in place of CoCreateInstance(). BUG=none TEST=none Review URL: https://codereview.chromium.org/13824005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/update_launcher.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome_frame/update_launcher.cc b/chrome_frame/update_launcher.cc
index 439626d..bd7860e 100644
--- a/chrome_frame/update_launcher.cc
+++ b/chrome_frame/update_launcher.cc
@@ -8,6 +8,7 @@
#include <Shellapi.h>
#include "base/win/scoped_com_initializer.h"
+#include "base/win/scoped_comptr.h"
#include "google_update/google_update_idl.h"
namespace {
@@ -57,12 +58,10 @@ DWORD LaunchUpdateCommand(const std::wstring& command) {
base::win::ScopedCOMInitializer com_initializer;
if (com_initializer.succeeded()) {
- IProcessLauncher* ipl = NULL;
+ base::win::ScopedComPtr<IProcessLauncher> ipl;
HANDLE process = NULL;
- HRESULT hr = ::CoCreateInstance(__uuidof(ProcessLauncherClass), NULL,
- CLSCTX_ALL, __uuidof(IProcessLauncher),
- reinterpret_cast<void**>(&ipl));
+ HRESULT hr = ipl.CreateInstance(__uuidof(ProcessLauncherClass));
if (SUCCEEDED(hr)) {
ULONG_PTR phandle = NULL;
@@ -78,8 +77,6 @@ DWORD LaunchUpdateCommand(const std::wstring& command) {
if (process)
::CloseHandle(process);
- if (ipl)
- ipl->Release();
}
return exit_code;