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

Side by Side Diff: components/omnibox/browser/in_memory_url_index.h

Issue 2300323003: Adding performance tests for HQP that represent importance of optimising HistoryItemsForTerms method (Closed)
Patch Set: Review, round 4. Created 4 years, 1 month 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
« no previous file with comments | « components/omnibox/browser/history_test_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 HQPPerfTestOnePopularURL;
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
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::HQPPerfTestOnePopularURL;
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
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_
OLDNEW
« no previous file with comments | « components/omnibox/browser/history_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698