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