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

Side by Side Diff: chrome/installer/util/wmi.cc

Issue 985853005: base: Remove operator& from ScopedVariant and ScopedPropVariant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoped-operator: prop-ptr Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/installer/util/wmi.h" 5 #include "chrome/installer/util/wmi.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/win/scoped_bstr.h" 10 #include "base/win/scoped_bstr.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (!items_returned) 152 if (!items_returned)
153 return base::string16(); 153 return base::string16();
154 154
155 base::win::ScopedVariant manufacturer; 155 base::win::ScopedVariant manufacturer;
156 class_object->Get(L"Manufacturer", 0, manufacturer.Receive(), 0, 0); 156 class_object->Get(L"Manufacturer", 0, manufacturer.Receive(), 0, 0);
157 base::win::ScopedVariant model; 157 base::win::ScopedVariant model;
158 class_object->Get(L"Model", 0, model.Receive(), 0, 0); 158 class_object->Get(L"Model", 0, model.Receive(), 0, 0);
159 159
160 base::string16 model_string; 160 base::string16 model_string;
161 if (manufacturer.type() == VT_BSTR) { 161 if (manufacturer.type() == VT_BSTR) {
162 model_string = V_BSTR(&manufacturer); 162 model_string = V_BSTR(manufacturer.ptr());
163 if (model.type() == VT_BSTR) 163 if (model.type() == VT_BSTR)
164 model_string += L" "; 164 model_string += L" ";
165 } 165 }
166 if (model.type() == VT_BSTR) 166 if (model.type() == VT_BSTR)
167 model_string += V_BSTR(&model); 167 model_string += V_BSTR(model.ptr());
168 168
169 return model_string; 169 return model_string;
170 } 170 }
171 171
172 } // namespace installer 172 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698