OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ |
6 #define CHROME_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ | 6 #define CHROME_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 std::vector<webkit_glue::PasswordForm>& matches); | 33 std::vector<webkit_glue::PasswordForm>& matches); |
34 | 34 |
35 // Removes the login held in |form| from the password store |store|. This | 35 // Removes the login held in |form| from the password store |store|. This |
36 // method blocks until the operation is complete. | 36 // method blocks until the operation is complete. |
37 void RemoveLogin(PasswordStore* store, const webkit_glue::PasswordForm& form); | 37 void RemoveLogin(PasswordStore* store, const webkit_glue::PasswordForm& form); |
38 | 38 |
39 // Removes all password forms from the password store |store|. | 39 // Removes all password forms from the password store |store|. |
40 void RemoveLogins(PasswordStore* store); | 40 void RemoveLogins(PasswordStore* store); |
41 | 41 |
42 // Sets the cryptographer's passphrase for the profile at index |index| to | 42 // Sets the cryptographer's passphrase for the profile at index |index| to |
43 // |passphrase|. |is_creation| is true if a new passphrase is being set up | 43 // |passphrase|. |
44 // and false otherwise. | 44 void SetPassphrase(int index, const std::string& passphrase); |
45 void SetPassphrase(int index, const std::string& passphrase, bool is_creation); | |
46 | 45 |
47 // Gets the password store of the profile with index |index|. | 46 // Gets the password store of the profile with index |index|. |
48 PasswordStore* GetPasswordStore(int index); | 47 PasswordStore* GetPasswordStore(int index); |
49 | 48 |
50 // Gets the password store of the verifier profile. | 49 // Gets the password store of the verifier profile. |
51 PasswordStore* GetVerifierPasswordStore(); | 50 PasswordStore* GetVerifierPasswordStore(); |
52 | 51 |
53 // Returns true iff the profile with index |index| contains the same password | 52 // Returns true iff the profile with index |index| contains the same password |
54 // forms as the verifier profile. | 53 // forms as the verifier profile. |
55 bool ProfileContainsSamePasswordFormsAsVerifier(int index); | 54 bool ProfileContainsSamePasswordFormsAsVerifier(int index); |
(...skipping 16 matching lines...) Expand all Loading... |
72 // Returns the number of forms in the password store of the verifier profile. | 71 // Returns the number of forms in the password store of the verifier profile. |
73 int GetVerifierPasswordCount(); | 72 int GetVerifierPasswordCount(); |
74 | 73 |
75 // Creates a test password form with a well known fake signon realm used only | 74 // Creates a test password form with a well known fake signon realm used only |
76 // by LivePasswordsSyncTest based on |index|. | 75 // by LivePasswordsSyncTest based on |index|. |
77 webkit_glue::PasswordForm CreateTestPasswordForm(int index); | 76 webkit_glue::PasswordForm CreateTestPasswordForm(int index); |
78 | 77 |
79 } // namespace passwords_helper | 78 } // namespace passwords_helper |
80 | 79 |
81 #endif // CHROME_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ | 80 #endif // CHROME_TEST_LIVE_SYNC_PASSWORDS_HELPER_H_ |
OLD | NEW |