OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/history/history_publisher.h" | 5 #include "chrome/browser/history/history_publisher.h" |
6 | 6 |
7 #include <atlsafe.h> | 7 #include <atlsafe.h> |
8 #include <oleauto.h> | 8 #include <oleauto.h> |
9 #include <wtypes.h> | 9 #include <wtypes.h> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 double var_time = TimeToUTCVariantTime(page_data.time); | 94 double var_time = TimeToUTCVariantTime(page_data.time); |
95 | 95 |
96 CComSafeArray<unsigned char> thumbnail_arr; | 96 CComSafeArray<unsigned char> thumbnail_arr; |
97 if (page_data.thumbnail) { | 97 if (page_data.thumbnail) { |
98 for (size_t i = 0; i < page_data.thumbnail->size(); ++i) | 98 for (size_t i = 0; i < page_data.thumbnail->size(); ++i) |
99 thumbnail_arr.Add((*page_data.thumbnail)[i]); | 99 thumbnail_arr.Add((*page_data.thumbnail)[i]); |
100 } | 100 } |
101 | 101 |
102 // Send data to registered indexers. | 102 // Send data to registered indexers. |
103 base::win::ScopedVariant time(var_time, VT_DATE); | 103 base::win::ScopedVariant time(var_time, VT_DATE); |
104 base::win::ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str()); | 104 base::win::ScopedBstr url(base::ASCIIToWide(page_data.url.spec()).c_str()); |
105 base::win::ScopedBstr html(page_data.html); | 105 base::win::ScopedBstr html(page_data.html); |
106 base::win::ScopedBstr title(page_data.title); | 106 base::win::ScopedBstr title(page_data.title); |
107 // Don't send a NULL string through ASCIIToWide. | 107 // Don't send a NULL string through base::ASCIIToWide. |
108 base::win::ScopedBstr format(page_data.thumbnail_format ? | 108 base::win::ScopedBstr format(page_data.thumbnail_format ? |
109 ASCIIToWide(page_data.thumbnail_format).c_str() : | 109 base::ASCIIToWide(page_data.thumbnail_format).c_str() : |
110 NULL); | 110 NULL); |
111 base::win::ScopedVariant psa(thumbnail_arr.m_psa); | 111 base::win::ScopedVariant psa(thumbnail_arr.m_psa); |
112 for (size_t i = 0; i < indexers_.size(); ++i) { | 112 for (size_t i = 0; i < indexers_.size(); ++i) { |
113 indexers_[i]->SendPageData(time, url, html, title, format, psa); | 113 indexers_[i]->SendPageData(time, url, html, title, format, psa); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 } // namespace history | 117 } // namespace history |
OLD | NEW |