| Index: chrome/installer/util/wmi.cc
|
| diff --git a/chrome/installer/util/wmi.cc b/chrome/installer/util/wmi.cc
|
| index 20c1050600f8c6c5f9f64ed862a755d89e47a06d..aef51a015b009f8c3a27eace5b455e48bcc1e0ac 100644
|
| --- a/chrome/installer/util/wmi.cc
|
| +++ b/chrome/installer/util/wmi.cc
|
| @@ -33,14 +33,9 @@ bool WMI::CreateLocalConnection(bool set_blanket,
|
| return false;
|
|
|
| if (set_blanket) {
|
| - hr = ::CoSetProxyBlanket(wmi_services_r,
|
| - RPC_C_AUTHN_WINNT,
|
| - RPC_C_AUTHZ_NONE,
|
| - NULL,
|
| - RPC_C_AUTHN_LEVEL_CALL,
|
| - RPC_C_IMP_LEVEL_IMPERSONATE,
|
| - NULL,
|
| - EOAC_NONE);
|
| + hr = ::CoSetProxyBlanket(wmi_services_r.get(), RPC_C_AUTHN_WINNT,
|
| + RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL,
|
| + RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
|
| if (FAILED(hr))
|
| return false;
|
| }
|
| @@ -69,7 +64,7 @@ bool WMI::CreateClassMethodObject(IWbemServices* wmi_services,
|
| if (FAILED(hr))
|
| return false;
|
|
|
| - if (NULL == params_def) {
|
| + if (NULL == params_def.get()) {
|
| // You hit this special case if the WMI class is not a CIM class. MSDN
|
| // sometimes tells you this. Welcome to WMI hell.
|
| return false;
|
| @@ -101,20 +96,20 @@ bool WMIProcess::Launch(const std::wstring& command_line, int* process_id) {
|
| const wchar_t class_name[] = L"Win32_Process";
|
| const wchar_t method_name[] = L"Create";
|
| base::win::ScopedComPtr<IWbemClassObject> process_create;
|
| - if (!WMI::CreateClassMethodObject(wmi_local, class_name, method_name,
|
| + if (!WMI::CreateClassMethodObject(wmi_local.get(), class_name, method_name,
|
| process_create.Receive()))
|
| return false;
|
|
|
| ScopedVariant b_command_line(command_line.c_str());
|
|
|
| - if (!SetParameter(process_create, L"CommandLine", b_command_line.AsInput()))
|
| + if (!SetParameter(process_create.get(), L"CommandLine",
|
| + b_command_line.AsInput()))
|
| return false;
|
|
|
| base::win::ScopedComPtr<IWbemClassObject> out_params;
|
| - HRESULT hr = wmi_local->ExecMethod(base::win::ScopedBstr(class_name),
|
| - base::win::ScopedBstr(method_name),
|
| - 0, NULL, process_create,
|
| - out_params.Receive(), NULL);
|
| + HRESULT hr = wmi_local->ExecMethod(
|
| + base::win::ScopedBstr(class_name), base::win::ScopedBstr(method_name), 0,
|
| + NULL, process_create.get(), out_params.Receive(), NULL);
|
| if (FAILED(hr))
|
| return false;
|
|
|
| @@ -147,7 +142,7 @@ base::string16 WMIComputerSystem::GetModel() {
|
| query_language, query,
|
| WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL,
|
| enumerator.Receive());
|
| - if (FAILED(hr) || !enumerator)
|
| + if (FAILED(hr) || !enumerator.get())
|
| return base::string16();
|
|
|
| base::win::ScopedComPtr<IWbemClassObject> class_object;
|
|
|