OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Contains the history backend wrapper around the in-memory URL database. This | 5 // Contains the history backend wrapper around the in-memory URL database. This |
6 // object maintains an in-memory cache of the subset of history required to do | 6 // object maintains an in-memory cache of the subset of history required to do |
7 // in-line autocomplete. | 7 // in-line autocomplete. |
8 // | 8 // |
9 // It is created on the history thread and passed to the main thread where | 9 // It is created on the history thread and passed to the main thread where |
10 // operations can be completed synchronously. It listens for notifications | 10 // operations can be completed synchronously. It listens for notifications |
(...skipping 21 matching lines...) Expand all Loading... |
32 class InMemoryDatabase; | 32 class InMemoryDatabase; |
33 class InMemoryURLIndex; | 33 class InMemoryURLIndex; |
34 struct KeywordSearchTermDetails; | 34 struct KeywordSearchTermDetails; |
35 class URLDatabase; | 35 class URLDatabase; |
36 struct URLsDeletedDetails; | 36 struct URLsDeletedDetails; |
37 struct URLsModifiedDetails; | 37 struct URLsModifiedDetails; |
38 | 38 |
39 class InMemoryHistoryBackend : public NotificationObserver { | 39 class InMemoryHistoryBackend : public NotificationObserver { |
40 public: | 40 public: |
41 InMemoryHistoryBackend(); | 41 InMemoryHistoryBackend(); |
42 ~InMemoryHistoryBackend(); | 42 virtual ~InMemoryHistoryBackend(); |
43 | 43 |
44 // Initializes the backend from the history database pointed to by the | 44 // Initializes the backend from the history database pointed to by the |
45 // full path in |history_filename|. |history_dir| is the path to the | 45 // full path in |history_filename|. |history_dir| is the path to the |
46 // directory containing the history database and is also used | 46 // directory containing the history database and is also used |
47 // as the directory where the InMemoryURLIndex's cache is kept. |db| is | 47 // as the directory where the InMemoryURLIndex's cache is kept. |db| is |
48 // used for building the InMemoryURLIndex. |languages| gives the | 48 // used for building the InMemoryURLIndex. |languages| gives the |
49 // preferred user languages with which URLs and page titles are | 49 // preferred user languages with which URLs and page titles are |
50 // interpreted while decomposing into words and characters during indexing. | 50 // interpreted while decomposing into words and characters during indexing. |
51 bool Init(const FilePath& history_filename, | 51 bool Init(const FilePath& history_filename, |
52 const FilePath& history_dir, | 52 const FilePath& history_dir, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // The index used for quick history lookups. | 99 // The index used for quick history lookups. |
100 scoped_ptr<history::InMemoryURLIndex> index_; | 100 scoped_ptr<history::InMemoryURLIndex> index_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend); | 102 DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace history | 105 } // namespace history |
106 | 106 |
107 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ | 107 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ |
OLD | NEW |