OLD | NEW |
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 Loading... |
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 |
OLD | NEW |