Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: chrome/browser/predictors/predictor_database_service.h

Issue 12225093: chrome/browser/predictors componentization part-1 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/predictor_database_service.h
diff --git a/chrome/browser/predictors/predictor_database_service.h b/chrome/browser/predictors/predictor_database_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..1061e4980c2c32f27027f807d2d4724b7443707c
--- /dev/null
+++ b/chrome/browser/predictors/predictor_database_service.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_
+#define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_
+
+#include "base/memory/ref_counted.h"
+#include "chrome/browser/predictors/predictor_database.h"
+#include "chrome/browser/profiles/profile_keyed_service.h"
+
+class Profile;
+
+namespace predictors {
+
+// Maintains per-profile information about PredictorDatabase.
+class PredictorDatabaseService: public ProfileKeyedService {
+ public:
+ explicit PredictorDatabaseService(Profile* profile);
+ virtual ~PredictorDatabaseService();
+
+ scoped_refptr<PredictorDatabase> GetDatabase() const {
+ return db_;
+ }
+
+ private:
+ // ProfileKeyedService
+ virtual void Shutdown() OVERRIDE;
+
+ // A pointer to the profile which this service refers to.
+ Profile* profile_;
+
+ scoped_refptr<PredictorDatabase> db_;
+
+ DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseService);
+};
+
+} // namespace predictors
+
+#endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_SERVICE_H_
« no previous file with comments | « chrome/browser/predictors/predictor_database_factory.cc ('k') | chrome/browser/predictors/predictor_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698