| OLD | NEW |
| 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 |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/time.h" | 11 #include "base/time.h" |
| 13 #include "chrome/browser/history/history_types.h" | 12 #include "chrome/browser/history/history_types.h" |
| 14 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 15 | 14 |
| 16 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 17 #include <atlbase.h> | 16 #include "base/scoped_comptr_win.h" |
| 18 #include <atlcomcli.h> | |
| 19 #include "history_indexer.h" | 17 #include "history_indexer.h" |
| 20 #endif | 18 #endif |
| 21 | 19 |
| 22 namespace history { | 20 namespace history { |
| 23 | 21 |
| 24 class HistoryPublisher { | 22 class HistoryPublisher { |
| 25 public: | 23 public: |
| 26 HistoryPublisher(); | 24 HistoryPublisher(); |
| 27 ~HistoryPublisher(); | 25 ~HistoryPublisher(); |
| 28 | 26 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 53 | 51 |
| 54 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
| 55 // Initializes the indexer_list_ with the list of indexers that registered | 53 // Initializes the indexer_list_ with the list of indexers that registered |
| 56 // with us to index history. Returns true if there are any registered. | 54 // with us to index history. Returns true if there are any registered. |
| 57 bool ReadRegisteredIndexersFromRegistry(); | 55 bool ReadRegisteredIndexersFromRegistry(); |
| 58 | 56 |
| 59 // Converts time represented by the Time class object to variant time in UTC. | 57 // Converts time represented by the Time class object to variant time in UTC. |
| 60 // Returns '0' if the time object is NULL. | 58 // Returns '0' if the time object is NULL. |
| 61 static double TimeToUTCVariantTime(const base::Time& time); | 59 static double TimeToUTCVariantTime(const base::Time& time); |
| 62 | 60 |
| 63 typedef std::vector<CComPtr<IChromeHistoryIndexer> > IndexerList; | 61 typedef std::vector< ScopedComPtr<IChromeHistoryIndexer> > IndexerList; |
| 64 | 62 |
| 65 // The list of indexers registered to receive history data from us. | 63 // The list of indexers registered to receive history data from us. |
| 66 IndexerList indexers_; | 64 IndexerList indexers_; |
| 67 | 65 |
| 68 // The Registry key under HKCU where the indexers need to register their | 66 // The Registry key under HKCU where the indexers need to register their |
| 69 // CLSID. | 67 // CLSID. |
| 70 static const wchar_t* kRegKeyRegisteredIndexersInfo; | 68 static const wchar_t* const kRegKeyRegisteredIndexersInfo; |
| 71 #endif | 69 #endif |
| 72 | 70 |
| 73 // The format of the thumbnail we pass to indexers. | 71 // The format of the thumbnail we pass to indexers. |
| 74 static const char* kThumbnailImageFormat; | 72 static const char* const kThumbnailImageFormat; |
| 75 | 73 |
| 76 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher); | 74 DISALLOW_COPY_AND_ASSIGN(HistoryPublisher); |
| 77 }; | 75 }; |
| 78 | 76 |
| 79 } // namespace history | 77 } // namespace history |
| 80 | 78 |
| 81 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ | 79 #endif // CHROME_BROWSER_HISTORY_HISTORY_PUBLISHER_H_ |
| OLD | NEW |