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

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

Issue 2802010: Revert 49594 - Convert page contents grabbing from wide to UTF16. The current... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/437/src/
Patch Set: Created 10 years, 6 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 | Annotate | Revision Log
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 "base/utf_string_conversions.h"
8
9 namespace history { 7 namespace history {
10 8
11 const char* const HistoryPublisher::kThumbnailImageFormat = "image/jpeg"; 9 const char* const HistoryPublisher::kThumbnailImageFormat = "image/jpeg";
12 10
13 void HistoryPublisher::PublishPageThumbnail( 11 void HistoryPublisher::PublishPageThumbnail(
14 const std::vector<unsigned char>& thumbnail, const GURL& url, 12 const std::vector<unsigned char>& thumbnail, const GURL& url,
15 const base::Time& time) const { 13 const base::Time& time) const {
16 PageData page_data = { 14 PageData page_data = {
17 time, 15 time,
18 url, 16 url,
19 NULL, 17 NULL,
20 NULL, 18 NULL,
21 kThumbnailImageFormat, 19 kThumbnailImageFormat,
22 &thumbnail, 20 &thumbnail,
23 }; 21 };
24 22
25 PublishDataToIndexers(page_data); 23 PublishDataToIndexers(page_data);
26 } 24 }
27 25
28 void HistoryPublisher::PublishPageContent(const base::Time& time, 26 void HistoryPublisher::PublishPageContent(const base::Time& time,
29 const GURL& url, 27 const GURL& url,
30 const std::wstring& title, 28 const std::wstring& title,
31 const string16& contents) const { 29 const std::wstring& contents) const {
32 PageData page_data = { 30 PageData page_data = {
33 time, 31 time,
34 url, 32 url,
35 UTF16ToWide(contents).c_str(), 33 contents.c_str(),
36 title.c_str(), 34 title.c_str(),
37 NULL, 35 NULL,
38 NULL, 36 NULL,
39 }; 37 };
40 38
41 PublishDataToIndexers(page_data); 39 PublishDataToIndexers(page_data);
42 } 40 }
43 41
44 } // namespace history 42 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_publisher.h ('k') | chrome/browser/history/history_querying_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698