Chromium Code Reviews| Index: extensions/browser/api/cast_channel/logger.h |
| diff --git a/extensions/browser/api/cast_channel/logger.h b/extensions/browser/api/cast_channel/logger.h |
| index fc301ca7f3f5b45d282f926995b271be64128213..5742849e7048abfc7bb863309d084bc1fbf9f89d 100644 |
| --- a/extensions/browser/api/cast_channel/logger.h |
| +++ b/extensions/browser/api/cast_channel/logger.h |
| @@ -69,12 +69,11 @@ class Logger : public base::RefCounted<Logger> { |
| const std::string& message_namespace, |
| const std::string& details); |
| - // Assembles logs collected so far and return it as a serialized Log proto. |
| - // |output|: Where serialized contents will be assigned to. |
| - // Returns true if serialization is successful. |
| - // Contents in |output| is valid only if function returns true. |
| - // TODO(imcheng): Add compression. |
| - bool LogToString(std::string* output) const; |
| + // Assembles logs collected so far and return it as a serialized Log proto, |
| + // compressed in gzip format. |
| + // If serialization or compression failed, returns a NULL pointer. |
| + // |length|: If successful, assigned with size of compressed content. |
| + scoped_ptr<char[]> GetLogs(int* length) const; |
|
Wez
2014/08/13 20:32:25
What's the rationale for changing this API from ha
imcheng
2014/08/13 20:46:04
The rationale is to avoid an extra copy when const
Wez
2014/08/14 18:51:23
Would it make sense to have GetLogs() return a sco
imcheng
2014/08/14 21:12:34
I think either way is fine. We can change it to ba
|
| // Clears the internal map. |
| void Reset(); |