Chromium Code Reviews| Index: components/offline_pages/offline_event_logger.h |
| diff --git a/components/offline_pages/offline_event_logger.h b/components/offline_pages/offline_event_logger.h |
| index 95ac36cc7914303dcb8f22f99e65b7db19141389..2eccf6f384ba4540d0d77e8e90f4fcc7cebd2d99 100644 |
| --- a/components/offline_pages/offline_event_logger.h |
| +++ b/components/offline_pages/offline_event_logger.h |
| @@ -11,6 +11,9 @@ |
| #include "base/macros.h" |
| +#define OFFLINE_LOG_TAG \ |
| + std::string(__FILE__) + "(" + std::to_string(__LINE__) + ") :" |
| + |
| namespace offline_pages { |
| // Maximum number of recorded Logs to keep track of at any moment. |
| @@ -27,6 +30,11 @@ static const size_t kMaxLogCount = 50; |
| // This log only keeps track of the last |kMaxLogCount| events. |
| class OfflineEventLogger { |
| public: |
| + class Client { |
|
chili
2016/11/25 00:00:07
So... if I understand it correctly, CustomLog and
romax
2016/11/30 00:15:10
Yes that was another option.
The goal is 'we need
chili
2016/11/30 04:56:39
Keeping the file handle on Java sounds/looks ok to
dougarnett
2016/11/30 18:05:25
It is a good point about hopping back and forth ov
romax
2016/12/01 01:47:52
Yes JNI is hard to test.
The current logging proce
chili
2016/12/01 21:07:04
I see.
As I mentioned, I'm fine with the CL as is
|
| + public: |
| + virtual void CustomLog(const std::string& message); |
|
chili
2016/11/30 04:56:40
nit - should this also have = 0?
romax
2016/12/01 01:47:52
Done.
|
| + }; |
| + |
| OfflineEventLogger(); |
| ~OfflineEventLogger(); |
| @@ -43,7 +51,9 @@ class OfflineEventLogger { |
| // Dumps the current activity list into |records|. |
| void GetLogs(std::vector<std::string>* records); |
| - protected: |
| + // Sets client. |
| + void SetClient(Client* client); |
| + |
| // Write the activity into the cycling log if we are currently logging. |
| void RecordActivity(const std::string& activity); |
| @@ -53,6 +63,9 @@ class OfflineEventLogger { |
| // Whether we are currently recording logs or not. |
| bool is_logging_; |
| + |
| + // Not owned. |
| + Client* client_; |
| }; |
| } // namespace offline_pages |