|
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 table to keep track of what sites a user is logged | |
21 // in to. | |
22 // All methods except the constructor and destructor need to be called on the DB | |
23 // thread. | |
Shishir
2013/04/16 22:25:14
Could you add a comment here along the lines of -
tburkard
2013/04/16 22:45:33
Done.
| |
24 class LoggedInPredictorTable : public PredictorTableBase { | |
25 public: | |
26 // Adds the relevant part of the domain of the URL provided to the database | |
27 // as the user having performed a login action. | |
28 void Add(const GURL& url); | |
29 // Checks whether for the relevant part of the domain of the URL provided, | |
30 // the user has performed a login action in the past. | |
31 void Exists(const GURL& url, bool* is_present, bool* lookup_succeeded); | |
Shishir
2013/04/16 22:25:14
Consider renaming to HasUserLoggedIn
tburkard
2013/04/16 22:45:33
Done.
| |
32 void DeleteAllCreatedBetween(const base::Time& delete_begin, | |
33 const base::Time& delete_end); | |
34 | |
35 private: | |
36 friend class PredictorDatabaseInternal; | |
37 | |
38 LoggedInPredictorTable(); | |
39 virtual ~LoggedInPredictorTable(); | |
40 | |
41 // PredictorTableBase methods. | |
42 virtual void CreateTableIfNonExistent() OVERRIDE; | |
43 virtual void LogDatabaseStats() OVERRIDE; | |
44 | |
45 std::string GetKey(const GURL& url); | |
Shishir
2013/04/16 22:25:14
const
tburkard
2013/04/16 22:45:33
Done.
| |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(LoggedInPredictorTable); | |
48 }; | |
49 | |
50 } // namespace predictors | |
51 | |
52 #endif // CHROME_BROWSER_PREDICTORS_LOGGED_IN_PREDICTOR_TABLE_H_ | |
OLD | NEW |