OLD | NEW |
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_BROWSER_SAVE_PASSWORD_PROG
RESS_LOGGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_BROWSER_SAVE_PASSWORD_PROG
RESS_LOGGER_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_BROWSER_SAVE_PASSWORD_PROG
RESS_LOGGER_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_BROWSER_SAVE_PASSWORD_PROG
RESS_LOGGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/autofill/core/common/save_password_progress_logger.h" | 10 #include "components/autofill/core/common/save_password_progress_logger.h" |
11 | 11 |
12 class PasswordManagerClient; | 12 class PasswordManagerClient; |
13 | 13 |
14 namespace IPC { | 14 namespace IPC { |
15 class Sender; | 15 class Sender; |
16 } | 16 } |
17 | 17 |
18 namespace autofill { | 18 namespace autofill { |
19 | 19 |
20 // This is the SavePasswordProgressLogger specialization for the renderer code, | 20 // This is the SavePasswordProgressLogger specialization for the renderer code, |
21 // which sends logs to the browser process over IPC. | 21 // which sends logs to the browser process over IPC. |
22 class RendererSavePasswordProgressLogger : public SavePasswordProgressLogger { | 22 class RendererSavePasswordProgressLogger : public SavePasswordProgressLogger { |
23 public: | 23 public: |
24 // The logger will use |sender| and |routing_id| to send a | 24 // The logger will use |sender| and |routing_id| to send a |
25 // AutofillHostMsg_RecordSavePasswordProgress message with the logs to the | 25 // AutofillHostMsg_RecordSavePasswordProgress message with the logs to the |
26 // browser. The |sender| needs to outlive the constructed logger. | 26 // browser. The |sender| needs to outlive the constructed logger. |
27 RendererSavePasswordProgressLogger(IPC::Sender* sender, int routing_id); | 27 RendererSavePasswordProgressLogger(IPC::Sender* sender, int routing_id); |
28 virtual ~RendererSavePasswordProgressLogger(); | 28 ~RendererSavePasswordProgressLogger() override; |
29 | 29 |
30 protected: | 30 protected: |
31 // SavePasswordProgressLogger: | 31 // SavePasswordProgressLogger: |
32 virtual void SendLog(const std::string& log) override; | 32 void SendLog(const std::string& log) override; |
33 | 33 |
34 private: | 34 private: |
35 // Used by SendLog to send the IPC message with logs. |sender_| needs to | 35 // Used by SendLog to send the IPC message with logs. |sender_| needs to |
36 // outlive the logger. | 36 // outlive the logger. |
37 IPC::Sender* const sender_; | 37 IPC::Sender* const sender_; |
38 const int routing_id_; | 38 const int routing_id_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(RendererSavePasswordProgressLogger); | 40 DISALLOW_COPY_AND_ASSIGN(RendererSavePasswordProgressLogger); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace autofill | 43 } // namespace autofill |
44 | 44 |
45 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_BROWSER_SAVE_PASSWORD_P
ROGRESS_LOGGER_H_ | 45 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_RENDERER_BROWSER_SAVE_PASSWORD_P
ROGRESS_LOGGER_H_ |
OLD | NEW |