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

Side by Side Diff: components/autofill/core/common/password_form.h

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/memory/scoped_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/autofill/core/common/form_data.h" 14 #include "components/autofill/core/common/form_data.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 #include "url/origin.h" 16 #include "url/origin.h"
17 17
18 namespace autofill { 18 namespace autofill {
19 19
20 // The PasswordForm struct encapsulates information about a login form, 20 // The PasswordForm struct encapsulates information about a login form,
21 // which can be an HTML form or a dialog with username/password text fields. 21 // which can be an HTML form or a dialog with username/password text fields.
22 // 22 //
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // (origin, username_element, username_value, password_element, signon_realm). 296 // (origin, username_element, username_value, password_element, signon_realm).
297 bool ArePasswordFormUniqueKeyEqual(const PasswordForm& left, 297 bool ArePasswordFormUniqueKeyEqual(const PasswordForm& left,
298 const PasswordForm& right); 298 const PasswordForm& right);
299 299
300 // A comparator for the unique key. 300 // A comparator for the unique key.
301 struct LessThanUniqueKey { 301 struct LessThanUniqueKey {
302 bool operator()(const PasswordForm* left, const PasswordForm* right) const; 302 bool operator()(const PasswordForm* left, const PasswordForm* right) const;
303 }; 303 };
304 304
305 // Map username to PasswordForm* for convenience. See password_form_manager.h. 305 // Map username to PasswordForm* for convenience. See password_form_manager.h.
306 using PasswordFormMap = std::map<base::string16, scoped_ptr<PasswordForm>>; 306 using PasswordFormMap = std::map<base::string16, std::unique_ptr<PasswordForm>>;
307 307
308 // Like PasswordFormMap, but with weak (not owned) pointers. 308 // Like PasswordFormMap, but with weak (not owned) pointers.
309 using ConstPasswordFormMap = std::map<base::string16, const PasswordForm*>; 309 using ConstPasswordFormMap = std::map<base::string16, const PasswordForm*>;
310 310
311 // For testing. 311 // For testing.
312 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); 312 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout);
313 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); 313 std::ostream& operator<<(std::ostream& os, const PasswordForm& form);
314 std::ostream& operator<<(std::ostream& os, PasswordForm* form); 314 std::ostream& operator<<(std::ostream& os, PasswordForm* form);
315 315
316 } // namespace autofill 316 } // namespace autofill
317 317
318 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 318 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_regexes.cc ('k') | components/autofill/core/common/password_form_fill_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698