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 CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ |
6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ | 6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "chrome/browser/profiles/profile_keyed_service.h" | 10 #include "chrome/browser/profiles/profile_keyed_service.h" |
11 | 11 |
12 class Profile; | 12 class Profile; |
13 | 13 |
14 namespace sql { | 14 namespace sql { |
15 class Connection; | 15 class Connection; |
16 } | 16 } |
17 | 17 |
18 namespace predictors { | 18 namespace predictors { |
19 | 19 |
20 class AutocompleteActionPredictorTable; | 20 class AutocompleteActionPredictorTable; |
21 class PredictorDatabaseInternal; | 21 class PredictorDatabaseInternal; |
| 22 class ResourcePrefetchPredictorTables; |
22 | 23 |
23 class PredictorDatabase : public ProfileKeyedService { | 24 class PredictorDatabase : public ProfileKeyedService { |
24 public: | 25 public: |
25 explicit PredictorDatabase(Profile* profile); | 26 explicit PredictorDatabase(Profile* profile); |
26 virtual ~PredictorDatabase(); | 27 virtual ~PredictorDatabase(); |
27 | 28 |
28 scoped_refptr<AutocompleteActionPredictorTable> autocomplete_table(); | 29 scoped_refptr<AutocompleteActionPredictorTable> autocomplete_table(); |
| 30 scoped_refptr<ResourcePrefetchPredictorTables> resource_prefetch_tables(); |
29 | 31 |
30 // Used for testing. | 32 // Used for testing. |
31 sql::Connection* GetDatabase(); | 33 sql::Connection* GetDatabase(); |
32 | 34 |
33 private: | 35 private: |
34 // ProfileKeyedService | 36 // ProfileKeyedService |
35 virtual void Shutdown() OVERRIDE; | 37 virtual void Shutdown() OVERRIDE; |
36 | 38 |
37 scoped_refptr<PredictorDatabaseInternal> db_; | 39 scoped_refptr<PredictorDatabaseInternal> db_; |
38 | 40 |
39 DISALLOW_COPY_AND_ASSIGN(PredictorDatabase); | 41 DISALLOW_COPY_AND_ASSIGN(PredictorDatabase); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace predictors | 44 } // namespace predictors |
43 | 45 |
44 #endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ | 46 #endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ |
OLD | NEW |