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

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

Issue 2274783002: Revert of [Autofill] Migrate ContentPasswordManagerDriver<-->Password{Autofill,Generation}Agent IPCs to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_LOG GER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_LOG GER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_LOG GER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_LOG GER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h"
12 #include "components/autofill/core/common/save_password_progress_logger.h" 11 #include "components/autofill/core/common/save_password_progress_logger.h"
13 12
13 class PasswordManagerClient;
14
14 namespace blink { 15 namespace blink {
15 class WebFormControlElement; 16 class WebFormControlElement;
16 } 17 }
17 18
19 namespace IPC {
20 class Sender;
21 }
22
18 namespace autofill { 23 namespace autofill {
19 24
20 // This is the SavePasswordProgressLogger specialization for the renderer code, 25 // This is the SavePasswordProgressLogger specialization for the renderer code,
21 // which sends logs to the browser process over IPC. 26 // which sends logs to the browser process over IPC.
22 class RendererSavePasswordProgressLogger : public SavePasswordProgressLogger { 27 class RendererSavePasswordProgressLogger : public SavePasswordProgressLogger {
23 public: 28 public:
24 // The logger will use |password_manager_driver| to send logs to the browser. 29 // The logger will use |sender| and |routing_id| to send a
25 // The |password_manager_driver| needs to outlive the constructed logger. 30 // AutofillHostMsg_RecordSavePasswordProgress message with the logs to the
26 RendererSavePasswordProgressLogger( 31 // browser. The |sender| needs to outlive the constructed logger.
27 mojom::PasswordManagerDriver* password_manager_driver); 32 RendererSavePasswordProgressLogger(IPC::Sender* sender, int routing_id);
28 ~RendererSavePasswordProgressLogger() override; 33 ~RendererSavePasswordProgressLogger() override;
29 34
30 void LogElementName(StringID label, 35 void LogElementName(StringID label,
31 const blink::WebFormControlElement& element); 36 const blink::WebFormControlElement& element);
32 37
33 protected: 38 protected:
34 // SavePasswordProgressLogger: 39 // SavePasswordProgressLogger:
35 void SendLog(const std::string& log) override; 40 void SendLog(const std::string& log) override;
36 41
37 private: 42 private:
38 // Used by SendLog to send the logs to the browser. 43 // Used by SendLog to send the IPC message with logs. |sender_| needs to
39 // |password_manager_driver_| needs to outlive the logger. 44 // outlive the logger.
40 mojom::PasswordManagerDriver* password_manager_driver_; 45 IPC::Sender* const sender_;
46 const int routing_id_;
41 47
42 DISALLOW_COPY_AND_ASSIGN(RendererSavePasswordProgressLogger); 48 DISALLOW_COPY_AND_ASSIGN(RendererSavePasswordProgressLogger);
43 }; 49 };
44 50
45 } // namespace autofill 51 } // namespace autofill
46 52
47 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_ LOGGER_H_ 53 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_SAVE_PASSWORD_PROGRESS_ LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698