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

Side by Side Diff: chrome/browser/predictors/logged_in_predictor_table.h

Issue 13903018: Add the LoggedIn Predictor, to detect which websites a user is likely (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: line break Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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.
24 // Manages one table { domain (primary key), added_timestamp }.
25 class LoggedInPredictorTable : public PredictorTableBase {
26 public:
27 // Adds the relevant part of the domain of the URL provided to the database
28 // as the user having performed a login action.
29 void Add(const GURL& url);
30 // Checks whether for the relevant part of the domain of the URL provided,
31 // the user has performed a login action in the past.
32 void HasUserLoggedIn(const GURL& url, bool* is_present,
33 bool* lookup_succeeded);
34 void DeleteAllCreatedBetween(const base::Time& delete_begin,
35 const base::Time& delete_end);
36
37 private:
38 friend class PredictorDatabaseInternal;
39
40 LoggedInPredictorTable();
41 virtual ~LoggedInPredictorTable();
42
43 // PredictorTableBase methods.
44 virtual void CreateTableIfNonExistent() OVERRIDE;
45 virtual void LogDatabaseStats() OVERRIDE;
46
47 std::string GetKey(const GURL& url) const;
48
49 DISALLOW_COPY_AND_ASSIGN(LoggedInPredictorTable);
50 };
51
52 } // namespace predictors
53
54 #endif // CHROME_BROWSER_PREDICTORS_LOGGED_IN_PREDICTOR_TABLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/predictors/logged_in_predictor_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698