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

Side by Side Diff: components/autofill/content/renderer/test_password_generation_agent.h

Issue 151503006: Re-land r248110 with ASAN error fixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Punctuation Created 6 years, 10 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
(Empty)
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 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_GENERATION_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_GENERATION_AGENT_H_
7
8 #include <vector>
9
10 #include "base/memory/scoped_vector.h"
11 #include "components/autofill/content/renderer/password_generation_agent.h"
12 #include "ipc/ipc_message.h"
13
14 namespace autofill {
15
16 class TestPasswordGenerationAgent : public PasswordGenerationAgent {
17 public:
18 explicit TestPasswordGenerationAgent(content::RenderView* render_view);
19 virtual ~TestPasswordGenerationAgent();
20
21 // content::RenderViewObserver implementation:
22 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
23 virtual bool Send(IPC::Message* message) OVERRIDE;
24
25 // Access messages that would have been sent to the browser.
26 const std::vector<IPC::Message*>& messages() const { return messages_.get(); }
27
28 // Clear outgoing message queue.
29 void clear_messages() { messages_.clear(); }
30
31 // PasswordGenreationAgent implementation:
32 // Always return true to allow loading of data URLs.
33 virtual bool ShouldAnalyzeDocument(
34 const blink::WebDocument& document) const OVERRIDE;
35
36 private:
37 ScopedVector<IPC::Message> messages_;
38
39 DISALLOW_COPY_AND_ASSIGN(TestPasswordGenerationAgent);
40 };
41
42 } // namespace autofill
43
44 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_TEST_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698