• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "components/autofill/content/renderer/test_password_generation_agent.h"
6 
7 namespace autofill {
8 
TestPasswordGenerationAgent(content::RenderView * render_view)9 TestPasswordGenerationAgent::TestPasswordGenerationAgent(
10     content::RenderView* render_view)
11     : PasswordGenerationAgent(render_view) {
12   // Always enable when testing.
13   set_enabled(true);
14 }
15 
~TestPasswordGenerationAgent()16 TestPasswordGenerationAgent::~TestPasswordGenerationAgent() {}
17 
OnMessageReceived(const IPC::Message & message)18 bool TestPasswordGenerationAgent::OnMessageReceived(
19     const IPC::Message& message) {
20   return PasswordGenerationAgent::OnMessageReceived(message);
21 }
22 
ShouldAnalyzeDocument(const blink::WebDocument & document) const23 bool TestPasswordGenerationAgent::ShouldAnalyzeDocument(
24     const blink::WebDocument& document) const {
25   return true;
26 }
27 
Send(IPC::Message * message)28 bool TestPasswordGenerationAgent::Send(IPC::Message* message) {
29   messages_.push_back(message);
30   return true;
31 }
32 
33 }  // namespace autofill
34