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

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

Issue 1212163007: Kill renderers for bad password forms in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing cross-origin redirect http auth Created 5 years, 5 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
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "components/autofill/core/common/password_form_field_prediction_map.h" 10 #include "components/autofill/core/common/password_form_field_prediction_map.h"
(...skipping 12 matching lines...) Expand all
23 struct LoadCommittedDetails; 23 struct LoadCommittedDetails;
24 class RenderFrameHost; 24 class RenderFrameHost;
25 class WebContents; 25 class WebContents;
26 } 26 }
27 27
28 namespace IPC { 28 namespace IPC {
29 class Message; 29 class Message;
30 } 30 }
31 31
32 namespace password_manager { 32 namespace password_manager {
33 enum class BadMessageReason;
33 34
34 // There is one ContentPasswordManagerDriver per RenderFrameHost. 35 // There is one ContentPasswordManagerDriver per RenderFrameHost.
35 // The lifetime is managed by the ContentPasswordManagerDriverFactory. 36 // The lifetime is managed by the ContentPasswordManagerDriverFactory.
36 class ContentPasswordManagerDriver : public PasswordManagerDriver { 37 class ContentPasswordManagerDriver : public PasswordManagerDriver {
37 public: 38 public:
38 ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host, 39 ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host,
39 PasswordManagerClient* client, 40 PasswordManagerClient* client,
40 autofill::AutofillClient* autofill_client); 41 autofill::AutofillClient* autofill_client);
41 ~ContentPasswordManagerDriver() override; 42 ~ContentPasswordManagerDriver() override;
42 43
(...skipping 23 matching lines...) Expand all
66 PasswordGenerationManager* GetPasswordGenerationManager() override; 67 PasswordGenerationManager* GetPasswordGenerationManager() override;
67 PasswordManager* GetPasswordManager() override; 68 PasswordManager* GetPasswordManager() override;
68 PasswordAutofillManager* GetPasswordAutofillManager() override; 69 PasswordAutofillManager* GetPasswordAutofillManager() override;
69 70
70 bool HandleMessage(const IPC::Message& message); 71 bool HandleMessage(const IPC::Message& message);
71 void DidNavigateFrame(const content::LoadCommittedDetails& details, 72 void DidNavigateFrame(const content::LoadCommittedDetails& details,
72 const content::FrameNavigateParams& params); 73 const content::FrameNavigateParams& params);
73 74
74 // Pass-throughs to PasswordManager. 75 // Pass-throughs to PasswordManager.
75 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); 76 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms);
77 void PasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms);
76 void OnPasswordFormsRendered( 78 void OnPasswordFormsRendered(
77 const std::vector<autofill::PasswordForm>& visible_forms, 79 const std::vector<autofill::PasswordForm>& visible_forms,
78 bool did_stop_loading); 80 bool did_stop_loading);
79 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); 81 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form);
80 void OnInPageNavigation(const autofill::PasswordForm& password_form); 82 void OnInPageNavigation(const autofill::PasswordForm& password_form);
81 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); 83 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form);
82 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form); 84 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form);
83 85
84 private: 86 private:
87 bool CheckChildProcessSecurityPolicy(const GURL& url, BadMessageReason);
ncarter (slow) 2015/07/16 18:04:10 Give a name to the 2nd parameter.
lfg 2015/07/16 18:33:14 Done.
88
85 content::RenderFrameHost* render_frame_host_; 89 content::RenderFrameHost* render_frame_host_;
86 PasswordManagerClient* client_; 90 PasswordManagerClient* client_;
87 PasswordGenerationManager password_generation_manager_; 91 PasswordGenerationManager password_generation_manager_;
88 PasswordAutofillManager password_autofill_manager_; 92 PasswordAutofillManager password_autofill_manager_;
89 93
90 // Every instance of PasswordFormFillData created by |*this| and sent to 94 // Every instance of PasswordFormFillData created by |*this| and sent to
91 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that 95 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that
92 // the latter two classes can reference to the same instance without sending 96 // the latter two classes can reference to the same instance without sending
93 // it to each other over IPC. The counter below is used to generate new IDs. 97 // it to each other over IPC. The counter below is used to generate new IDs.
94 int next_free_key_; 98 int next_free_key_;
95 99
96 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); 100 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver);
97 }; 101 };
98 102
99 } // namespace password_manager 103 } // namespace password_manager
100 104
101 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_ DRIVER_H_ 105 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_ DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698