| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/browser/predictors/predictor_database.h" |
| 10 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 namespace predictors { |
| 15 |
| 16 // Maintains per-profile information about PredictorDatabase. |
| 17 class PredictorDatabaseService: public ProfileKeyedService { |
| 18 public: |
| 19 explicit PredictorDatabaseService(Profile* profile); |
| 20 virtual ~PredictorDatabaseService(); |
| 21 |
| 22 scoped_refptr<PredictorDatabase> GetDatabase() const { |
| 23 return db_; |
| 24 } |
| 25 |
| 26 private: |
| 27 // ProfileKeyedService |
| 28 virtual void Shutdown() OVERRIDE; |
| 29 |
| 30 // A pointer to the profile which this service refers to. |
| 31 Profile* profile_; |
| 32 |
| 33 scoped_refptr<PredictorDatabase> db_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseService); |
| 36 }; |
| 37 |
| 38 } // namespace predictors |
| 39 |
| 40 #endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_ |
| OLD | NEW |