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

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

Issue 10909046: Boost HQP Scores for Bookmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Minor edits. Created 8 years, 3 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 | Annotate | Revision Log
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 CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 5 #ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
6 #define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 6 #define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
7 7
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 FRIEND_TEST_ALL_PREFIXES(LimitedInMemoryURLIndexTest, Initialization); 142 FRIEND_TEST_ALL_PREFIXES(LimitedInMemoryURLIndexTest, Initialization);
143 143
144 // Creating one of me without a history path is not allowed (tests excepted). 144 // Creating one of me without a history path is not allowed (tests excepted).
145 InMemoryURLIndex(); 145 InMemoryURLIndex();
146 146
147 // HistoryDBTask used to rebuild our private data from the history database. 147 // HistoryDBTask used to rebuild our private data from the history database.
148 class RebuildPrivateDataFromHistoryDBTask : public HistoryDBTask { 148 class RebuildPrivateDataFromHistoryDBTask : public HistoryDBTask {
149 public: 149 public:
150 explicit RebuildPrivateDataFromHistoryDBTask( 150 explicit RebuildPrivateDataFromHistoryDBTask(
151 InMemoryURLIndex* index, 151 InMemoryURLIndex* index,
152 Profile* profile,
152 const std::string& languages, 153 const std::string& languages,
153 const std::set<std::string>& scheme_whitelist); 154 const std::set<std::string>& scheme_whitelist);
154 155
155 virtual bool RunOnDBThread(HistoryBackend* backend, 156 virtual bool RunOnDBThread(HistoryBackend* backend,
156 history::HistoryDatabase* db) OVERRIDE; 157 history::HistoryDatabase* db) OVERRIDE;
157 virtual void DoneRunOnMainThread() OVERRIDE; 158 virtual void DoneRunOnMainThread() OVERRIDE;
158 159
159 private: 160 private:
160 virtual ~RebuildPrivateDataFromHistoryDBTask(); 161 virtual ~RebuildPrivateDataFromHistoryDBTask();
161 162
162 InMemoryURLIndex* index_; // Call back to this index at completion. 163 InMemoryURLIndex* index_; // Call back to this index at completion.
164 Profile* profile_;
163 std::string languages_; // Languages for word-breaking. 165 std::string languages_; // Languages for word-breaking.
164 std::set<std::string> scheme_whitelist_; // Schemes to be indexed. 166 std::set<std::string> scheme_whitelist_; // Schemes to be indexed.
165 bool succeeded_; // Indicates if the rebuild was successful. 167 bool succeeded_; // Indicates if the rebuild was successful.
166 scoped_refptr<URLIndexPrivateData> data_; // The rebuilt private data. 168 scoped_refptr<URLIndexPrivateData> data_; // The rebuilt private data.
167 169
168 DISALLOW_COPY_AND_ASSIGN(RebuildPrivateDataFromHistoryDBTask); 170 DISALLOW_COPY_AND_ASSIGN(RebuildPrivateDataFromHistoryDBTask);
169 }; 171 };
170 172
171 // Initializes all index data members in preparation for restoring the index 173 // Initializes all index data members in preparation for restoring the index
172 // from the cache or a complete rebuild from the history database. 174 // from the cache or a complete rebuild from the history database.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // TODO(mrossetti): Eliminate once the transition to SQLite has been done. 283 // TODO(mrossetti): Eliminate once the transition to SQLite has been done.
282 // http://crbug.com/83659 284 // http://crbug.com/83659
283 bool needs_to_be_cached_; 285 bool needs_to_be_cached_;
284 286
285 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex); 287 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex);
286 }; 288 };
287 289
288 } // namespace history 290 } // namespace history
289 291
290 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 292 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/in_memory_url_index.cc » ('j') | chrome/browser/history/in_memory_url_index.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698