Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / predictors / predictor_database.h
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_H_
6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service.h"
10
11 class Profile;
12
13 namespace sql {
14 class Connection;
15 }
16
17 namespace predictors {
18
19 class AutocompleteActionPredictorTable;
20 class LoggedInPredictorTable;
21 class PredictorDatabaseInternal;
22
23 class PredictorDatabase : public BrowserContextKeyedService {
24  public:
25   explicit PredictorDatabase(Profile* profile);
26   virtual ~PredictorDatabase();
27
28   scoped_refptr<AutocompleteActionPredictorTable> autocomplete_table();
29   scoped_refptr<LoggedInPredictorTable> logged_in_table();
30
31   // Used for testing.
32   sql::Connection* GetDatabase();
33
34  private:
35   // BrowserContextKeyedService
36   virtual void Shutdown() OVERRIDE;
37
38   scoped_refptr<PredictorDatabaseInternal> db_;
39
40   DISALLOW_COPY_AND_ASSIGN(PredictorDatabase);
41 };
42
43 }  // namespace predictors
44
45 #endif  // CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_