| 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 #ifndef CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ | 6 #define CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // You must call Init() to complete initialization. | 69 // You must call Init() to complete initialization. |
| 70 // | 70 // |
| 71 // |dir| is the directory that will hold the full text database files (there | 71 // |dir| is the directory that will hold the full text database files (there |
| 72 // will be many files named by their date ranges). | 72 // will be many files named by their date ranges). |
| 73 // | 73 // |
| 74 // The visit database is a pointer owned by the caller for the main database | 74 // The visit database is a pointer owned by the caller for the main database |
| 75 // (of recent visits). The visit database will be updated to refer to the | 75 // (of recent visits). The visit database will be updated to refer to the |
| 76 // added text database entries. | 76 // added text database entries. |
| 77 explicit TextDatabaseManager(const FilePath& dir, | 77 TextDatabaseManager(const FilePath& dir, |
| 78 URLDatabase* url_database, | 78 URLDatabase* url_database, |
| 79 VisitDatabase* visit_database); | 79 VisitDatabase* visit_database); |
| 80 ~TextDatabaseManager(); | 80 ~TextDatabaseManager(); |
| 81 | 81 |
| 82 // Must call before using other functions. If it returns false, no other | 82 // Must call before using other functions. If it returns false, no other |
| 83 // functions should be called. | 83 // functions should be called. |
| 84 bool Init(const HistoryPublisher* history_publisher); | 84 bool Init(const HistoryPublisher* history_publisher); |
| 85 | 85 |
| 86 // Returns the directory that holds the full text database files. | 86 // Returns the directory that holds the full text database files. |
| 87 const FilePath& GetDir() { return dir_; } | 87 const FilePath& GetDir() { return dir_; } |
| 88 | 88 |
| 89 // Allows scoping updates. This also allows things to go faster since every | 89 // Allows scoping updates. This also allows things to go faster since every |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // This can be NULL if there are no indexers registered to receive indexing | 303 // This can be NULL if there are no indexers registered to receive indexing |
| 304 // data from us. | 304 // data from us. |
| 305 const HistoryPublisher* history_publisher_; | 305 const HistoryPublisher* history_publisher_; |
| 306 | 306 |
| 307 DISALLOW_COPY_AND_ASSIGN(TextDatabaseManager); | 307 DISALLOW_COPY_AND_ASSIGN(TextDatabaseManager); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 } // namespace history | 310 } // namespace history |
| 311 | 311 |
| 312 #endif // CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ | 312 #endif // CHROME_BROWSER_HISTORY_TEXT_DATABASE_MANAGER_H_ |
| OLD | NEW |