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

Side by Side Diff: chrome/browser/history/history_publisher_win.cc

Issue 5507001: base: Remove stub scoped_variant_win.h file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « base/win/scoped_variant.cc ('k') | chrome_frame/test/chrome_frame_ui_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-2009 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 <objbase.h> 8 #include <objbase.h>
9 #include <oleauto.h> 9 #include <oleauto.h>
10 #include <wtypes.h> 10 #include <wtypes.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const { 112 const {
113 double var_time = TimeToUTCVariantTime(page_data.time); 113 double var_time = TimeToUTCVariantTime(page_data.time);
114 114
115 CComSafeArray<unsigned char> thumbnail_arr; 115 CComSafeArray<unsigned char> thumbnail_arr;
116 if (page_data.thumbnail) { 116 if (page_data.thumbnail) {
117 for (size_t i = 0; i < page_data.thumbnail->size(); ++i) 117 for (size_t i = 0; i < page_data.thumbnail->size(); ++i)
118 thumbnail_arr.Add((*page_data.thumbnail)[i]); 118 thumbnail_arr.Add((*page_data.thumbnail)[i]);
119 } 119 }
120 120
121 // Send data to registered indexers. 121 // Send data to registered indexers.
122 ScopedVariant time(var_time, VT_DATE); 122 base::win::ScopedVariant time(var_time, VT_DATE);
123 ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str()); 123 ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str());
124 ScopedBstr html(page_data.html); 124 ScopedBstr html(page_data.html);
125 ScopedBstr title(page_data.title); 125 ScopedBstr title(page_data.title);
126 // Don't send a NULL string through ASCIIToWide. 126 // Don't send a NULL string through ASCIIToWide.
127 ScopedBstr format(page_data.thumbnail_format ? 127 ScopedBstr format(page_data.thumbnail_format ?
128 ASCIIToWide(page_data.thumbnail_format).c_str() : 128 ASCIIToWide(page_data.thumbnail_format).c_str() :
129 NULL); 129 NULL);
130 ScopedVariant psa(thumbnail_arr.m_psa); 130 base::win::ScopedVariant psa(thumbnail_arr.m_psa);
131 for (size_t i = 0; i < indexers_.size(); ++i) { 131 for (size_t i = 0; i < indexers_.size(); ++i) {
132 indexers_[i]->SendPageData(time, url, html, title, format, psa); 132 indexers_[i]->SendPageData(time, url, html, title, format, psa);
133 } 133 }
134 } 134 }
135 135
136 void HistoryPublisher::DeleteUserHistoryBetween(const base::Time& begin_time, 136 void HistoryPublisher::DeleteUserHistoryBetween(const base::Time& begin_time,
137 const base::Time& end_time) 137 const base::Time& end_time)
138 const { 138 const {
139 ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time), VT_DATE); 139 base::win::ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time),
140 ScopedVariant var_end_time(TimeToUTCVariantTime(end_time), VT_DATE); 140 VT_DATE);
141 base::win::ScopedVariant var_end_time(TimeToUTCVariantTime(end_time),
142 VT_DATE);
141 for (size_t i = 0; i < indexers_.size(); ++i) { 143 for (size_t i = 0; i < indexers_.size(); ++i) {
142 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time); 144 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time);
143 } 145 }
144 } 146 }
145 147
146 } // namespace history 148 } // namespace history
OLDNEW
« no previous file with comments | « base/win/scoped_variant.cc ('k') | chrome_frame/test/chrome_frame_ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698