| OLD | NEW |
| 1 // Copyright (c) 2008-2009 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 "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 | 8 |
| 9 namespace history { | 9 namespace history { |
| 10 | 10 |
| 11 const char* const HistoryPublisher::kThumbnailImageFormat = "image/jpeg"; | 11 const char* const HistoryPublisher::kThumbnailImageFormat = "image/jpeg"; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 22 &thumbnail, | 22 &thumbnail, |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 PublishDataToIndexers(page_data); | 25 PublishDataToIndexers(page_data); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void HistoryPublisher::PublishPageContent(const base::Time& time, | 28 void HistoryPublisher::PublishPageContent(const base::Time& time, |
| 29 const GURL& url, | 29 const GURL& url, |
| 30 const string16& title, | 30 const string16& title, |
| 31 const string16& contents) const { | 31 const string16& contents) const { |
| 32 std::wstring wide_title = UTF16ToWide(title); | |
| 33 std::wstring wide_contents = UTF16ToWide(contents); | |
| 34 PageData page_data = { | 32 PageData page_data = { |
| 35 time, | 33 time, |
| 36 url, | 34 url, |
| 37 wide_contents.c_str(), | 35 contents.c_str(), |
| 38 wide_title.c_str(), | 36 title.c_str(), |
| 39 NULL, | 37 NULL, |
| 40 NULL, | 38 NULL, |
| 41 }; | 39 }; |
| 42 | 40 |
| 43 PublishDataToIndexers(page_data); | 41 PublishDataToIndexers(page_data); |
| 44 } | 42 } |
| 45 | 43 |
| 46 } // namespace history | 44 } // namespace history |
| OLD | NEW |