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

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

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 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 CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 class TestPasswordStore : public PasswordStore { 26 class TestPasswordStore : public PasswordStore {
27 public: 27 public:
28 TestPasswordStore(); 28 TestPasswordStore();
29 29
30 // Helper function for registration with 30 // Helper function for registration with
31 // RefcountedBrowserContextKeyedService::SetTestingFactory 31 // RefcountedBrowserContextKeyedService::SetTestingFactory
32 static scoped_refptr<RefcountedBrowserContextKeyedService> Create( 32 static scoped_refptr<RefcountedBrowserContextKeyedService> Create(
33 content::BrowserContext* profile); 33 content::BrowserContext* profile);
34 34
35 typedef std::map<std::string /* signon_realm */, 35 typedef std::map<std::string /* signon_realm */,
36 std::vector<content::PasswordForm> > PasswordMap; 36 std::vector<autofill::PasswordForm> > PasswordMap;
37 37
38 PasswordMap stored_passwords(); 38 PasswordMap stored_passwords();
39 void Clear(); 39 void Clear();
40 40
41 protected: 41 protected:
42 virtual ~TestPasswordStore(); 42 virtual ~TestPasswordStore();
43 43
44 // Helper function to determine if forms are considered equivalent. 44 // Helper function to determine if forms are considered equivalent.
45 bool FormsAreEquivalent(const content::PasswordForm& lhs, 45 bool FormsAreEquivalent(const autofill::PasswordForm& lhs,
46 const content::PasswordForm& rhs); 46 const autofill::PasswordForm& rhs);
47 47
48 // PasswordStore interface 48 // PasswordStore interface
49 virtual void AddLoginImpl(const content::PasswordForm& form) OVERRIDE; 49 virtual void AddLoginImpl(const autofill::PasswordForm& form) OVERRIDE;
50 virtual void UpdateLoginImpl(const content::PasswordForm& form) OVERRIDE; 50 virtual void UpdateLoginImpl(const autofill::PasswordForm& form) OVERRIDE;
51 virtual void RemoveLoginImpl(const content::PasswordForm& form) OVERRIDE; 51 virtual void RemoveLoginImpl(const autofill::PasswordForm& form) OVERRIDE;
52 virtual void GetLoginsImpl(const content::PasswordForm& form, 52 virtual void GetLoginsImpl(const autofill::PasswordForm& form,
53 const ConsumerCallbackRunner& runner) OVERRIDE; 53 const ConsumerCallbackRunner& runner) OVERRIDE;
54 virtual bool ScheduleTask(const base::Closure& task) OVERRIDE; 54 virtual bool ScheduleTask(const base::Closure& task) OVERRIDE;
55 virtual void WrapModificationTask(base::Closure task) OVERRIDE; 55 virtual void WrapModificationTask(base::Closure task) OVERRIDE;
56 56
57 // Unused portions of PasswordStore interface 57 // Unused portions of PasswordStore interface
58 virtual void ReportMetricsImpl() OVERRIDE {} 58 virtual void ReportMetricsImpl() OVERRIDE {}
59 virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& begin, 59 virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& begin,
60 const base::Time& end) OVERRIDE {} 60 const base::Time& end) OVERRIDE {}
61 virtual void GetAutofillableLoginsImpl( 61 virtual void GetAutofillableLoginsImpl(
62 PasswordStore::GetLoginsRequest* request) OVERRIDE {} 62 PasswordStore::GetLoginsRequest* request) OVERRIDE {}
63 virtual void GetBlacklistLoginsImpl( 63 virtual void GetBlacklistLoginsImpl(
64 PasswordStore::GetLoginsRequest* request) OVERRIDE {} 64 PasswordStore::GetLoginsRequest* request) OVERRIDE {}
65 virtual bool FillAutofillableLogins( 65 virtual bool FillAutofillableLogins(
66 std::vector<content::PasswordForm*>* forms) OVERRIDE; 66 std::vector<autofill::PasswordForm*>* forms) OVERRIDE;
67 virtual bool FillBlacklistLogins( 67 virtual bool FillBlacklistLogins(
68 std::vector<content::PasswordForm*>* forms) OVERRIDE; 68 std::vector<autofill::PasswordForm*>* forms) OVERRIDE;
69 virtual void ShutdownOnUIThread() OVERRIDE {} 69 virtual void ShutdownOnUIThread() OVERRIDE {}
70 70
71 private: 71 private:
72 PasswordMap stored_passwords_; 72 PasswordMap stored_passwords_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(TestPasswordStore); 74 DISALLOW_COPY_AND_ASSIGN(TestPasswordStore);
75 }; 75 };
76 76
77 #endif // CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_ 77 #endif // CHROME_BROWSER_PASSWORD_MANAGER_TEST_PASSWORD_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_x_unittest.cc ('k') | chrome/browser/password_manager/test_password_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698