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

Side by Side Diff: components/password_manager/core/browser/login_database.h

Issue 2133953002: PasswordForm -> FormDigest for GetLogins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@413020_ssl_valid
Patch Set: Nits addressed Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 base::Time delete_end); 80 base::Time delete_end);
81 81
82 // Sets the 'skip_zero_click' flag on all forms on |origin| to 'true'. 82 // Sets the 'skip_zero_click' flag on all forms on |origin| to 'true'.
83 bool DisableAutoSignInForOrigin(const GURL& origin); 83 bool DisableAutoSignInForOrigin(const GURL& origin);
84 84
85 // All Get* methods below overwrite |forms| with the returned credentials. On 85 // All Get* methods below overwrite |forms| with the returned credentials. On
86 // success, those methods return true. 86 // success, those methods return true.
87 87
88 // Gets a list of credentials matching |form|, including blacklisted matches 88 // Gets a list of credentials matching |form|, including blacklisted matches
89 // and federated credentials. 89 // and federated credentials.
90 bool GetLogins(const autofill::PasswordForm& form, 90 bool GetLogins(const PasswordStore::FormDigest& form,
91 ScopedVector<autofill::PasswordForm>* forms) const 91 ScopedVector<autofill::PasswordForm>* forms) const
92 WARN_UNUSED_RESULT; 92 WARN_UNUSED_RESULT;
93 93
94 // Gets all logins created from |begin| onwards (inclusive) and before |end|. 94 // Gets all logins created from |begin| onwards (inclusive) and before |end|.
95 // You may use a null Time value to do an unbounded search in either 95 // You may use a null Time value to do an unbounded search in either
96 // direction. 96 // direction.
97 bool GetLoginsCreatedBetween( 97 bool GetLoginsCreatedBetween(
98 base::Time begin, 98 base::Time begin,
99 base::Time end, 99 base::Time end,
100 ScopedVector<autofill::PasswordForm>* forms) const WARN_UNUSED_RESULT; 100 ScopedVector<autofill::PasswordForm>* forms) const WARN_UNUSED_RESULT;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // credentials. On success returns true and overwrites |forms| with the 184 // credentials. On success returns true and overwrites |forms| with the
185 // result. 185 // result.
186 bool GetAllLoginsWithBlacklistSetting( 186 bool GetAllLoginsWithBlacklistSetting(
187 bool blacklisted, 187 bool blacklisted,
188 ScopedVector<autofill::PasswordForm>* forms) const; 188 ScopedVector<autofill::PasswordForm>* forms) const;
189 189
190 // Overwrites |forms| with credentials retrieved from |statement|. If 190 // Overwrites |forms| with credentials retrieved from |statement|. If
191 // |matched_form| is not null, filters out all results but those PSL-matching 191 // |matched_form| is not null, filters out all results but those PSL-matching
192 // |*matched_form| or federated credentials for it. On success returns true. 192 // |*matched_form| or federated credentials for it. On success returns true.
193 static bool StatementToForms(sql::Statement* statement, 193 static bool StatementToForms(sql::Statement* statement,
194 const autofill::PasswordForm* matched_form, 194 const PasswordStore::FormDigest* matched_form,
195 ScopedVector<autofill::PasswordForm>* forms); 195 ScopedVector<autofill::PasswordForm>* forms);
196 196
197 // Initializes all the *_statement_ data members with appropriate SQL 197 // Initializes all the *_statement_ data members with appropriate SQL
198 // fragments based on |builder|. 198 // fragments based on |builder|.
199 void InitializeStatementStrings(const SQLTableBuilder& builder); 199 void InitializeStatementStrings(const SQLTableBuilder& builder);
200 200
201 base::FilePath db_path_; 201 base::FilePath db_path_;
202 mutable sql::Connection db_; 202 mutable sql::Connection db_;
203 sql::MetaTable meta_table_; 203 sql::MetaTable meta_table_;
204 StatisticsTable stats_table_; 204 StatisticsTable stats_table_;
(...skipping 19 matching lines...) Expand all
224 std::string synced_statement_; 224 std::string synced_statement_;
225 std::string blacklisted_statement_; 225 std::string blacklisted_statement_;
226 std::string encrypted_statement_; 226 std::string encrypted_statement_;
227 227
228 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); 228 DISALLOW_COPY_AND_ASSIGN(LoginDatabase);
229 }; 229 };
230 230
231 } // namespace password_manager 231 } // namespace password_manager
232 232
233 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ 233 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698