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

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

Issue 1415533013: Fix password manager internals renderer reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate dummy log manager Created 5 years, 1 month 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_PASSWORD_MANAGER_DRI VER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI VER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI VER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI VER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const std::map<autofill::FormData, 59 const std::map<autofill::FormData,
60 autofill::PasswordFormFieldPredictionMap>& predictions) 60 autofill::PasswordFormFieldPredictionMap>& predictions)
61 override; 61 override;
62 void GeneratedPasswordAccepted(const base::string16& password) override; 62 void GeneratedPasswordAccepted(const base::string16& password) override;
63 void FillSuggestion(const base::string16& username, 63 void FillSuggestion(const base::string16& username,
64 const base::string16& password) override; 64 const base::string16& password) override;
65 void PreviewSuggestion(const base::string16& username, 65 void PreviewSuggestion(const base::string16& username,
66 const base::string16& password) override; 66 const base::string16& password) override;
67 void ClearPreviewedForm() override; 67 void ClearPreviewedForm() override;
68 void ForceSavePassword() override; 68 void ForceSavePassword() override;
69 void NotifyAboutLoggingAvailability(bool is_available) override;
69 70
70 PasswordGenerationManager* GetPasswordGenerationManager() override; 71 PasswordGenerationManager* GetPasswordGenerationManager() override;
71 PasswordManager* GetPasswordManager() override; 72 PasswordManager* GetPasswordManager() override;
72 PasswordAutofillManager* GetPasswordAutofillManager() override; 73 PasswordAutofillManager* GetPasswordAutofillManager() override;
73 74
74 bool HandleMessage(const IPC::Message& message); 75 bool HandleMessage(const IPC::Message& message);
75 void DidNavigateFrame(const content::LoadCommittedDetails& details, 76 void DidNavigateFrame(const content::LoadCommittedDetails& details,
76 const content::FrameNavigateParams& params); 77 const content::FrameNavigateParams& params);
77 78
78 // Pass-throughs to PasswordManager. 79 // Pass-throughs to PasswordManager.
79 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); 80 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms);
80 void OnPasswordFormsParsedNoRenderCheck( 81 void OnPasswordFormsParsedNoRenderCheck(
81 const std::vector<autofill::PasswordForm>& forms); 82 const std::vector<autofill::PasswordForm>& forms);
82 void OnPasswordFormsRendered( 83 void OnPasswordFormsRendered(
83 const std::vector<autofill::PasswordForm>& visible_forms, 84 const std::vector<autofill::PasswordForm>& visible_forms,
84 bool did_stop_loading); 85 bool did_stop_loading);
85 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); 86 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form);
86 void OnInPageNavigation(const autofill::PasswordForm& password_form); 87 void OnInPageNavigation(const autofill::PasswordForm& password_form);
87 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); 88 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form);
88 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form); 89 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form);
89 90
90 private: 91 private:
91 bool CheckChildProcessSecurityPolicy(const GURL& url, 92 bool CheckChildProcessSecurityPolicy(const GURL& url,
92 BadMessageReason reason); 93 BadMessageReason reason);
93 94
95 // Sends |logging_available_| to the renderer.
96 void SendLoggingAvailability();
97
94 content::RenderFrameHost* render_frame_host_; 98 content::RenderFrameHost* render_frame_host_;
95 PasswordManagerClient* client_; 99 PasswordManagerClient* client_;
96 PasswordGenerationManager password_generation_manager_; 100 PasswordGenerationManager password_generation_manager_;
97 PasswordAutofillManager password_autofill_manager_; 101 PasswordAutofillManager password_autofill_manager_;
98 102
99 // Every instance of PasswordFormFillData created by |*this| and sent to 103 // Every instance of PasswordFormFillData created by |*this| and sent to
100 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that 104 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that
101 // the latter two classes can reference to the same instance without sending 105 // the latter two classes can reference to the same instance without sending
102 // it to each other over IPC. The counter below is used to generate new IDs. 106 // it to each other over IPC. The counter below is used to generate new IDs.
103 int next_free_key_; 107 int next_free_key_;
104 108
109 // Whether logging to chrome://password-manager-internals is available.
110 bool logging_available_ = false;
vasilii 2015/11/13 12:17:31 Why can't you just ask the client's LoginManager i
vabr (Chromium) 2015/11/13 20:48:18 Fair enough, I realize the API provides two ways t
111
105 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); 112 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver);
106 }; 113 };
107 114
108 } // namespace password_manager 115 } // namespace password_manager
109 116
110 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_ DRIVER_H_ 117 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_ DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698