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

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

Issue 18758: Port some unit tests from chrome/browser/ (Closed)
Patch Set: port the tests Created 11 years, 10 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
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 #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
(...skipping 30 matching lines...) Expand all
41 41
42 private: 42 private:
43 struct PageData { 43 struct PageData {
44 const base::Time& time; 44 const base::Time& time;
45 const GURL& url; 45 const GURL& url;
46 const wchar_t* html; 46 const wchar_t* html;
47 const wchar_t* title; 47 const wchar_t* title;
48 const char* thumbnail_format; 48 const char* thumbnail_format;
49 const std::vector<unsigned char>* thumbnail; 49 const std::vector<unsigned char>* thumbnail;
50 }; 50 };
51
51 void PublishDataToIndexers(const PageData& page_data) const; 52 void PublishDataToIndexers(const PageData& page_data) const;
52 53
54 #if defined(OS_WIN)
55 // Initializes the indexer_list_ with the list of indexers that registered
56 // with us to index history. Returns true if there are any registered.
57 bool ReadRegisteredIndexersFromRegistry();
58
53 // Converts time represented by the Time class object to variant time in UTC. 59 // Converts time represented by the Time class object to variant time in UTC.
54 // Returns '0' if the time object is NULL. 60 // Returns '0' if the time object is NULL.
55 static double TimeToUTCVariantTime(const base::Time& time); 61 static double TimeToUTCVariantTime(const base::Time& time);
56 62
57 // Initializes the indexer_list_ with the list of indexers that registered
58 // with us to index history. Returns true if there are any registered.
59 bool ReadRegisteredIndexersFromRegistry();
60
61 private:
62 #if defined(OS_WIN)
63 typedef std::vector<CComPtr<IChromeHistoryIndexer> > IndexerList; 63 typedef std::vector<CComPtr<IChromeHistoryIndexer> > IndexerList;
64 64
65 // The list of indexers registered to receive history data from us. 65 // The list of indexers registered to receive history data from us.
66 IndexerList indexers_; 66 IndexerList indexers_;
67 #endif
68 67
69 // The Registry key under HKCU where the indexers need to register their 68 // The Registry key under HKCU where the indexers need to register their
70 // CLSID. 69 // CLSID.
71 static const wchar_t* kRegKeyRegisteredIndexersInfo; 70 static const wchar_t* kRegKeyRegisteredIndexersInfo;
71 #endif
72 72
73 // The format of the thumbnail we pass to indexers. 73 // The format of the thumbnail we pass to indexers.
74 static const char* kThumbnailImageFormat; 74 static const char* kThumbnailImageFormat;
75 75
76 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher); 76 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher);
77 }; 77 };
78 78
79 } // namespace history 79 } // namespace history
80 80
81 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ 81 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend_unittest.cc ('k') | chrome/browser/history/history_publisher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698