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__) + ") :" |
|
fgorski
2016/11/30 17:30:48
Is this used anywhere?
romax
2016/12/01 01:47:53
Yes it's being used in the evaluation_test_schedul
|
| + |
| 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 { |
|
fgorski
2016/11/30 17:30:48
virtual dtor missing
dougarnett
2016/11/30 18:05:25
class comment here - Is this an optional custom lo
romax
2016/12/01 01:47:53
Done.
|
| + public: |
| + virtual void CustomLog(const std::string& message); |
| + }; |
| + |
| 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. |
|
dougarnett
2016/11/30 18:05:25
a bit more - eg, what is client, required or optio
romax
2016/12/01 01:47:53
Done.
|
| + void SetClient(Client* client); |
| + |
| // Write the activity into the cycling log if we are currently logging. |
| void RecordActivity(const std::string& activity); |
|
fgorski
2016/11/30 17:30:48
why is this no longer protected?
romax
2016/12/01 01:47:53
evaluation_test_bridge is calling this directly. I
|
| @@ -53,6 +63,9 @@ class OfflineEventLogger { |
| // Whether we are currently recording logs or not. |
|
dougarnett
2016/11/30 18:05:25
does this also control whether to send log message
romax
2016/12/01 01:47:53
yes
|
| bool is_logging_; |
| + |
| + // Not owned. |
| + Client* client_; |
| }; |
| } // namespace offline_pages |