| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class BookmarkModel; | 40 class BookmarkModel; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace in_memory_url_index { | 43 namespace in_memory_url_index { |
| 44 class InMemoryURLIndexCacheItem; | 44 class InMemoryURLIndexCacheItem; |
| 45 } | 45 } |
| 46 | 46 |
| 47 namespace history { | 47 namespace history { |
| 48 class HistoryDatabase; | 48 class HistoryDatabase; |
| 49 class HistoryService; | 49 class HistoryService; |
| 50 class HQPPerfTestBase; |
| 50 } | 51 } |
| 51 | 52 |
| 52 class URLIndexPrivateData; | 53 class URLIndexPrivateData; |
| 53 | 54 |
| 54 typedef std::set<std::string> SchemeSet; | 55 typedef std::set<std::string> SchemeSet; |
| 55 | 56 |
| 56 // The URL history source. | 57 // The URL history source. |
| 57 // Holds portions of the URL database in memory in an indexed form. Used to | 58 // Holds portions of the URL database in memory in an indexed form. Used to |
| 58 // quickly look up matching URLs for a given query string. Used by | 59 // quickly look up matching URLs for a given query string. Used by |
| 59 // the HistoryURLProvider for inline autocomplete and to provide URL | 60 // the HistoryURLProvider for inline autocomplete and to provide URL |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 save_cache_observer_ = save_cache_observer; | 142 save_cache_observer_ = save_cache_observer; |
| 142 } | 143 } |
| 143 | 144 |
| 144 // Indicates that the index restoration is complete. | 145 // Indicates that the index restoration is complete. |
| 145 bool restored() const { | 146 bool restored() const { |
| 146 return restored_; | 147 return restored_; |
| 147 } | 148 } |
| 148 | 149 |
| 149 private: | 150 private: |
| 150 friend class ::HistoryQuickProviderTest; | 151 friend class ::HistoryQuickProviderTest; |
| 152 friend class history::HQPPerfTestBase; |
| 151 friend class InMemoryURLIndexTest; | 153 friend class InMemoryURLIndexTest; |
| 152 friend class InMemoryURLIndexCacheTest; | 154 friend class InMemoryURLIndexCacheTest; |
| 153 FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, ExpireRow); | 155 FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, ExpireRow); |
| 154 FRIEND_TEST_ALL_PREFIXES(LimitedInMemoryURLIndexTest, Initialization); | 156 FRIEND_TEST_ALL_PREFIXES(LimitedInMemoryURLIndexTest, Initialization); |
| 155 | 157 |
| 156 // HistoryDBTask used to rebuild our private data from the history database. | 158 // HistoryDBTask used to rebuild our private data from the history database. |
| 157 class RebuildPrivateDataFromHistoryDBTask : public history::HistoryDBTask { | 159 class RebuildPrivateDataFromHistoryDBTask : public history::HistoryDBTask { |
| 158 public: | 160 public: |
| 159 explicit RebuildPrivateDataFromHistoryDBTask( | 161 explicit RebuildPrivateDataFromHistoryDBTask( |
| 160 InMemoryURLIndex* index, const SchemeSet& scheme_whitelist); | 162 InMemoryURLIndex* index, const SchemeSet& scheme_whitelist); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // This flag is set to true if we want to listen to the | 317 // This flag is set to true if we want to listen to the |
| 316 // HistoryServiceLoaded Notification. | 318 // HistoryServiceLoaded Notification. |
| 317 bool listen_to_history_service_loaded_; | 319 bool listen_to_history_service_loaded_; |
| 318 | 320 |
| 319 base::ThreadChecker thread_checker_; | 321 base::ThreadChecker thread_checker_; |
| 320 | 322 |
| 321 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex); | 323 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex); |
| 322 }; | 324 }; |
| 323 | 325 |
| 324 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ | 326 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ |
| OLD | NEW |