|
OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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_LOGGED_IN_PREDICTOR_TABLE_H_ | |
6 #define CHROME_BROWSER_PREDICTORS_LOGGED_IN_PREDICTOR_TABLE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/time.h" | |
11 #include "chrome/browser/predictors/predictor_table_base.h" | |
12 #include "googleurl/src/gurl.h" | |
13 | |
14 namespace sql { | |
15 class Statement; | |
16 } | |
17 | |
18 namespace predictors { | |
19 | |
20 // Interface for database tables used by the ResourcePrefetchPredictor. | |
21 // All methods except the constructor and destructor need to be called on the DB | |
22 // thread. | |
23 // | |
24 // Currently manages: | |
25 // - UrlResourceTable - resources per Urls. | |
Shishir
2013/04/16 21:22:04
These comments are invalid. Please update.
tburkard
2013/04/16 21:47:19
Done.
| |
26 // - UrlMetadataTable - misc data for Urls (like last visit time). | |
27 // - HostResourceTable - resources per host. | |
28 // - HostMetadataTable - misc data for hosts. | |
29 class LoggedInPredictorTable : public PredictorTableBase { | |
Shishir
2013/04/16 21:22:04
LoggedInPredictor seems a bit generic - Would Logg
tburkard
2013/04/16 21:47:19
As explained, this will eventually be used for pur
| |
30 public: | |
31 void Add(const GURL& url); | |
Shishir
2013/04/16 21:22:04
Please explain the table schema.
tburkard
2013/04/16 21:47:19
Done.
| |
32 void Exists(const GURL& url, bool* is_present, bool* lookup_succeeded); | |
33 void DeleteAllCreatedBetween(const base::Time& delete_begin, | |
34 const base::Time& delete_end); | |
35 | |
36 private: | |
37 friend class PredictorDatabaseInternal; | |
38 | |
39 LoggedInPredictorTable(); | |
40 virtual ~LoggedInPredictorTable(); | |
41 | |
42 // PredictorTableBase methods. | |
43 virtual void CreateTableIfNonExistent() OVERRIDE; | |
44 virtual void LogDatabaseStats() OVERRIDE; | |
45 | |
46 std::string GetKey(const GURL& url); | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(LoggedInPredictorTable); | |
49 }; | |
50 | |
51 } // namespace predictors | |
52 | |
53 #endif // CHROME_BROWSER_PREDICTORS_LOGGED_IN_PREDICTOR_TABLE_H_ | |
OLD | NEW |