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

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

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address gcasto's comments. Created 6 years, 9 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
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_TEST_PASSWORD_STORE_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_PASSWORD_STORE_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_PASSWORD_STORE_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_PASSWORD_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "components/password_manager/core/browser/password_store.h" 13 #include "components/password_manager/core/browser/password_store.h"
14 14
15 namespace content { 15 namespace content {
16 class BrowserContext; 16 class BrowserContext;
17 } 17 }
18 18
19 // A very simple PasswordStore implementation that keeps all of the passwords 19 // A very simple PasswordStore implementation that keeps all of the passwords
20 // in memory and does all it's manipulations on the main thread. Since this 20 // in memory and does all its manipulations on the main thread. Since this
21 // is only used for testing, only the parts of the interface that are needed 21 // is only used for testing, only the parts of the interface that are needed
22 // for testing have been implemented. 22 // for testing have been implemented.
23 class TestPasswordStore : public PasswordStore { 23 class TestPasswordStore : public PasswordStore {
24 public: 24 public:
25 TestPasswordStore(); 25 TestPasswordStore();
26 26
27 typedef std::map<std::string /* signon_realm */, 27 typedef std::map<std::string /* signon_realm */,
28 std::vector<autofill::PasswordForm> > PasswordMap; 28 std::vector<autofill::PasswordForm> > PasswordMap;
29 29
30 PasswordMap stored_passwords(); 30 PasswordMap stored_passwords();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual bool FillBlacklistLogins( 63 virtual bool FillBlacklistLogins(
64 std::vector<autofill::PasswordForm*>* forms) OVERRIDE; 64 std::vector<autofill::PasswordForm*>* forms) OVERRIDE;
65 65
66 private: 66 private:
67 PasswordMap stored_passwords_; 67 PasswordMap stored_passwords_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(TestPasswordStore); 69 DISALLOW_COPY_AND_ASSIGN(TestPasswordStore);
70 }; 70 };
71 71
72 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_PASSWORD_STORE_H_ 72 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_PASSWORD_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698