Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
Nico
2010/06/10 21:03:35
:-P
| |
| 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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/string16.h" | |
|
Nico
2010/06/10 21:03:35
forward declare?
brettw
2010/06/11 21:01:04
We can't forward declare a string16 since it's act
| |
| 12 | 13 |
| 13 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 14 #include "base/scoped_comptr_win.h" | 15 #include "base/scoped_comptr_win.h" |
| 15 #include "history_indexer.h" | 16 #include "history_indexer.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class Time; | 22 class Time; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace history { | 25 namespace history { |
| 25 | 26 |
| 26 class HistoryPublisher { | 27 class HistoryPublisher { |
| 27 public: | 28 public: |
| 28 HistoryPublisher(); | 29 HistoryPublisher(); |
| 29 ~HistoryPublisher(); | 30 ~HistoryPublisher(); |
| 30 | 31 |
| 31 // Must call this function to complete initialization. Returns true if we | 32 // Must call this function to complete initialization. Returns true if we |
| 32 // need to publish data to any indexers registered with us. Returns false if | 33 // need to publish data to any indexers registered with us. Returns false if |
| 33 // there are none registered. On false, no other function should be called. | 34 // there are none registered. On false, no other function should be called. |
| 34 bool Init(); | 35 bool Init(); |
| 35 | 36 |
| 36 void PublishPageThumbnail(const std::vector<unsigned char>& thumbnail, | 37 void PublishPageThumbnail(const std::vector<unsigned char>& thumbnail, |
| 37 const GURL& url, const base::Time& time) const; | 38 const GURL& url, const base::Time& time) const; |
| 38 void PublishPageContent(const base::Time& time, const GURL& url, | 39 void PublishPageContent(const base::Time& time, const GURL& url, |
| 39 const std::wstring& title, | 40 const std::wstring& title, |
| 40 const std::wstring& contents) const; | 41 const string16& contents) const; |
| 41 void DeleteUserHistoryBetween(const base::Time& begin_time, | 42 void DeleteUserHistoryBetween(const base::Time& begin_time, |
| 42 const base::Time& end_time) const; | 43 const base::Time& end_time) const; |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 struct PageData { | 46 struct PageData { |
| 46 const base::Time& time; | 47 const base::Time& time; |
| 47 const GURL& url; | 48 const GURL& url; |
| 48 const wchar_t* html; | 49 const wchar_t* html; |
| 49 const wchar_t* title; | 50 const wchar_t* title; |
| 50 const char* thumbnail_format; | 51 const char* thumbnail_format; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 74 | 75 |
| 75 // The format of the thumbnail we pass to indexers. | 76 // The format of the thumbnail we pass to indexers. |
| 76 static const char* const kThumbnailImageFormat; | 77 static const char* const kThumbnailImageFormat; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher); | 79 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace history | 82 } // namespace history |
| 82 | 83 |
| 83 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ | 84 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ |
| OLD | NEW |