| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PASSWORD_STORE_WIN_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual int GetLogins(const webkit_glue::PasswordForm& form, | 27 virtual int GetLogins(const webkit_glue::PasswordForm& form, |
| 28 PasswordStoreConsumer* consumer); | 28 PasswordStoreConsumer* consumer); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 virtual ~PasswordStoreWin(); | 31 virtual ~PasswordStoreWin(); |
| 32 | 32 |
| 33 // See PasswordStoreDefault. | 33 // See PasswordStoreDefault. |
| 34 void OnWebDataServiceRequestDone(WebDataService::Handle h, | 34 void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 35 const WDTypedResult* result); | 35 const WDTypedResult* result); |
| 36 | 36 |
| 37 virtual void NotifyConsumer( | 37 virtual void ForwardLoginsResult(GetLoginsRequest* request); |
| 38 GetLoginsRequest* request, | |
| 39 const std::vector<webkit_glue::PasswordForm*> forms); | |
| 40 | 38 |
| 41 // Takes ownership of |request| and tracks it under |handle|. | 39 // Takes ownership of |request| and tracks it under |handle|. |
| 42 void TrackRequest(WebDataService::Handle handle, GetLoginsRequest* request); | 40 void TrackRequest(WebDataService::Handle handle, GetLoginsRequest* request); |
| 43 | 41 |
| 44 // Finds the GetLoginsRequest associated with the in-flight WebDataService | 42 // Finds the GetLoginsRequest associated with the in-flight WebDataService |
| 45 // request identified by |handle|, removes it from the tracking list, and | 43 // request identified by |handle|, removes it from the tracking list, and |
| 46 // returns it. Ownership of the GetLoginsRequest passes to the caller. | 44 // returns it. Ownership of the GetLoginsRequest passes to the caller. |
| 47 // Returns NULL if the request has been cancelled. | 45 // Returns NULL if the request has been cancelled. |
| 48 GetLoginsRequest* TakeRequestWithHandle(WebDataService::Handle handle); | 46 GetLoginsRequest* TakeRequestWithHandle(WebDataService::Handle handle); |
| 49 | 47 |
| 50 // Gets logins from IE7 if no others are found. Also copies them into | 48 // Gets logins from IE7 if no others are found. Also copies them into |
| 51 // Chrome's WebDatabase so we don't need to look next time. | 49 // Chrome's WebDatabase so we don't need to look next time. |
| 52 webkit_glue::PasswordForm* GetIE7Result( | 50 webkit_glue::PasswordForm* GetIE7Result( |
| 53 const WDTypedResult* result, | 51 const WDTypedResult* result, |
| 54 const webkit_glue::PasswordForm& form); | 52 const webkit_glue::PasswordForm& form); |
| 55 | 53 |
| 56 // Holds requests associated with in-flight GetLogin queries. | 54 // Holds requests associated with in-flight GetLogin queries. |
| 57 typedef std::map<int, GetLoginsRequest*> PendingRequestMap; | 55 typedef std::map<int, GetLoginsRequest*> PendingRequestMap; |
| 58 PendingRequestMap pending_requests_; | 56 PendingRequestMap pending_requests_; |
| 59 | 57 |
| 60 // Holds forms associated with in-flight GetLogin queries. | 58 // Holds forms associated with in-flight GetLogin queries. |
| 61 typedef std::map<int, webkit_glue::PasswordForm> PendingRequestFormMap; | 59 typedef std::map<int, webkit_glue::PasswordForm> PendingRequestFormMap; |
| 62 PendingRequestFormMap pending_request_forms_; | 60 PendingRequestFormMap pending_request_forms_; |
| 63 | 61 |
| 64 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); | 62 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); |
| 65 }; | 63 }; |
| 66 | 64 |
| 67 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 65 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
| OLD | NEW |