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

Side by Side Diff: chrome/browser/password_manager/login_database.h

Issue 2834009: Implement Password Manager aggregate metrics reporting (Closed)
Patch Set: rebase to head Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/login_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 // the login information. 21 // the login information.
22 class LoginDatabase { 22 class LoginDatabase {
23 public: 23 public:
24 LoginDatabase(); 24 LoginDatabase();
25 virtual ~LoginDatabase(); 25 virtual ~LoginDatabase();
26 26
27 // Initialize the database with an sqlite file at the given path. 27 // Initialize the database with an sqlite file at the given path.
28 // If false is returned, no other method should be called. 28 // If false is returned, no other method should be called.
29 bool Init(const FilePath& db_path); 29 bool Init(const FilePath& db_path);
30 30
31 // Reports usage metrics to UMA.
32 void ReportMetrics();
33
31 // Adds |form| to the list of remembered password forms. 34 // Adds |form| to the list of remembered password forms.
32 bool AddLogin(const webkit_glue::PasswordForm& form); 35 bool AddLogin(const webkit_glue::PasswordForm& form);
33 36
34 // Updates remembered password form. Returns true on success and sets 37 // Updates remembered password form. Returns true on success and sets
35 // items_changed (if non-NULL) to the number of logins updated. 38 // items_changed (if non-NULL) to the number of logins updated.
36 bool UpdateLogin(const webkit_glue::PasswordForm& form, int* items_changed); 39 bool UpdateLogin(const webkit_glue::PasswordForm& form, int* items_changed);
37 40
38 // Removes |form| from the list of remembered password forms. 41 // Removes |form| from the list of remembered password forms.
39 bool RemoveLogin(const webkit_glue::PasswordForm& form); 42 bool RemoveLogin(const webkit_glue::PasswordForm& form);
40 43
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool blacklisted, std::vector<webkit_glue::PasswordForm*>* forms) const; 90 bool blacklisted, std::vector<webkit_glue::PasswordForm*>* forms) const;
88 91
89 mutable sql::Connection db_; 92 mutable sql::Connection db_;
90 sql::MetaTable meta_table_; 93 sql::MetaTable meta_table_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); 95 DISALLOW_COPY_AND_ASSIGN(LoginDatabase);
93 }; 96 };
94 97
95 98
96 #endif // CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ 99 #endif // CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/login_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698