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

Side by Side Diff: components/password_manager/content/browser/content_credential_manager_dispatcher.h

Issue 802303002: Credential Manager: Switch 'request()' to GetAutofillableLogins(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 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_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D ISPATCHER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D ISPATCHER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D ISPATCHER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D ISPATCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
vabr (Chromium) 2014/12/15 10:47:22 Pleas add #include "base/memory/scoped_ptr.h"
11 #include "components/password_manager/core/browser/credential_manager_dispatcher .h" 11 #include "components/password_manager/core/browser/credential_manager_dispatcher .h"
12 #include "components/password_manager/core/browser/password_store_consumer.h" 12 #include "components/password_manager/core/browser/password_store_consumer.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace autofill { 17 namespace autofill {
18 struct PasswordForm; 18 struct PasswordForm;
19 } 19 }
20 20
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool OnMessageReceived(const IPC::Message& message) override; 54 bool OnMessageReceived(const IPC::Message& message) override;
55 55
56 // PasswordStoreConsumer implementation. 56 // PasswordStoreConsumer implementation.
57 void OnGetPasswordStoreResults( 57 void OnGetPasswordStoreResults(
58 const std::vector<autofill::PasswordForm*>& results) override; 58 const std::vector<autofill::PasswordForm*>& results) override;
59 59
60 using CredentialCallback = 60 using CredentialCallback =
61 base::Callback<void(const autofill::PasswordForm&)>; 61 base::Callback<void(const autofill::PasswordForm&)>;
62 62
63 private: 63 private:
64 struct PendingRequestParameters;
65
64 PasswordStore* GetPasswordStore(); 66 PasswordStore* GetPasswordStore();
65 67
66 // Returns the driver for the current main frame. 68 // Returns the driver for the current main frame.
67 // Virtual for testing. 69 // Virtual for testing.
68 virtual base::WeakPtr<PasswordManagerDriver> GetDriver(); 70 virtual base::WeakPtr<PasswordManagerDriver> GetDriver();
69 71
70 void SendCredential(int request_id, const CredentialInfo& info); 72 void SendCredential(int request_id, const CredentialInfo& info);
71 73
72 PasswordManagerClient* client_; 74 PasswordManagerClient* client_;
73 scoped_ptr<CredentialManagerPasswordFormManager> form_manager_; 75 scoped_ptr<CredentialManagerPasswordFormManager> form_manager_;
74 76
75 // When 'OnRequestCredential' is called, it in turn calls out to the 77 // When 'OnRequestCredential' is called, it in turn calls out to the
76 // PasswordStore; we store the request ID here in order to properly respond 78 // PasswordStore; we store request details here in order to properly
77 // to the request once the PasswordStore gives us data. 79 // respond to the request once the PasswordStore gives us data.
78 int pending_request_id_; 80 scoped_ptr<PendingRequestParameters> pending_request_;
79 81
80 DISALLOW_COPY_AND_ASSIGN(ContentCredentialManagerDispatcher); 82 DISALLOW_COPY_AND_ASSIGN(ContentCredentialManagerDispatcher);
81 }; 83 };
82 84
83 } // namespace password_manager 85 } // namespace password_manager
84 86
85 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE R_DISPATCHER_H_ 87 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE R_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698