OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // The order of these includes is important. | 5 // The order of these includes is important. |
6 #include <windows.h> | 6 #include <windows.h> |
7 #include <unknwn.h> | 7 #include <unknwn.h> |
8 #include <intshcut.h> | 8 #include <intshcut.h> |
9 #include <propvarutil.h> | 9 #include <propvarutil.h> |
10 #include <shlguid.h> | 10 #include <shlguid.h> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 STGM_WRITE, | 187 STGM_WRITE, |
188 property_storage.Receive()))) { | 188 property_storage.Receive()))) { |
189 return false; | 189 return false; |
190 } | 190 } |
191 PROPSPEC properties[] = {{PRSPEC_PROPID, PID_IS_ICONFILE}}; | 191 PROPSPEC properties[] = {{PRSPEC_PROPID, PID_IS_ICONFILE}}; |
192 // WriteMultiple takes an array of PROPVARIANTs, but since this code only | 192 // WriteMultiple takes an array of PROPVARIANTs, but since this code only |
193 // needs an array of size 1: a pointer to |pv_icon| is equivalent. | 193 // needs an array of size 1: a pointer to |pv_icon| is equivalent. |
194 base::win::ScopedPropVariant pv_icon; | 194 base::win::ScopedPropVariant pv_icon; |
195 if (FAILED(InitPropVariantFromString(favicon_url.c_str(), | 195 if (FAILED(InitPropVariantFromString(favicon_url.c_str(), |
196 pv_icon.Receive())) || | 196 pv_icon.Receive())) || |
197 FAILED(property_storage->WriteMultiple(1, properties, &pv_icon, 0))) { | 197 FAILED(property_storage->WriteMultiple(1, properties, &pv_icon.get(), |
Nico
2015/03/09 21:11:32
just pv_icon.get(), no &, no?
danakj
2015/03/09 21:44:36
Added a ptr() to ScopedPropVariant to match Scoped
| |
198 0))) { | |
198 return false; | 199 return false; |
199 } | 200 } |
200 } | 201 } |
201 | 202 |
202 // Save the .url file. | 203 // Save the .url file. |
203 result = persist_file->Save(file.value().c_str(), TRUE); | 204 result = persist_file->Save(file.value().c_str(), TRUE); |
204 if (FAILED(result)) | 205 if (FAILED(result)) |
205 return false; | 206 return false; |
206 | 207 |
207 // Write dummy favicon image data in NTFS alternate data stream. | 208 // Write dummy favicon image data in NTFS alternate data stream. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
646 source_profile.source_path = temp_dir_.path(); | 647 source_profile.source_path = temp_dir_.path(); |
647 | 648 |
648 host->StartImportSettings( | 649 host->StartImportSettings( |
649 source_profile, | 650 source_profile, |
650 browser()->profile(), | 651 browser()->profile(), |
651 importer::HOME_PAGE, | 652 importer::HOME_PAGE, |
652 observer); | 653 observer); |
653 base::MessageLoop::current()->Run(); | 654 base::MessageLoop::current()->Run(); |
654 } | 655 } |
655 | 656 |
OLD | NEW |