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

Unified Diff: extensions/browser/api/cast_channel/logger.h

Issue 456213002: Cast channel: Add cast.channel.getLogs extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mfoltz's and agl's comments Created 6 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 side-by-side diff with in-line comments
Download patch
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..66046b0ffa3fd4d55a71d7cea38f92d5b188c6a8 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(size_t* length) const;
// Clears the internal map.
void Reset();

Powered by Google App Engine
This is Rietveld 408576698