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

Unified Diff: net/base/file_stream.h

Issue 9288084: Added Net logging to FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clarified comments Created 8 years, 11 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: net/base/file_stream.h
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index f2a8f7f4f94701027ed5a2a08b822dec83491922..142f806ca89cb689431fb7883ab7ff38dd73f7cf 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -15,6 +15,7 @@
#include "base/platform_file.h"
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
+#include "net/base/net_log.h"
class FilePath;
@@ -32,6 +33,9 @@ class NET_EXPORT FileStream {
public:
FileStream();
+ // Create a new BoundNetLog and attach it to the stream.
Randy Smith (Not in Mondays) 2012/01/30 21:27:41 The primary thing a constructor does is construct
ahendrickson 2012/01/30 22:30:53 Done.
+ FileStream(net::NetLog* log);
+
// Construct a FileStream with an existing file handle and opening flags.
// |file| is valid file handle.
// |flags| is a bitfield of base::PlatformFileFlags when the file handle was
@@ -136,6 +140,9 @@ class NET_EXPORT FileStream {
// Turns on UMA error statistics gathering.
void EnableErrorStatistics();
+ // Sets the source reference for net-internals logging.
Randy Smith (Not in Mondays) 2012/01/30 21:27:41 If this has restrictions with regard to how the Fi
ahendrickson 2012/01/30 22:30:53 The only difference is that if |net_log_| is inval
+ void SetBoundNetLogSource(const net::BoundNetLog& log);
+
private:
class AsyncContext;
friend class AsyncContext;
@@ -149,6 +156,7 @@ class NET_EXPORT FileStream {
int open_flags_;
bool auto_closed_;
bool record_uma_;
+ net::BoundNetLog net_log_;
Randy Smith (Not in Mondays) 2012/01/30 21:27:41 I'm uncomfortable calling a BoundNetLog a net_log_
ahendrickson 2012/01/30 22:30:53 Done.
DISALLOW_COPY_AND_ASSIGN(FileStream);
};

Powered by Google App Engine
This is Rietveld 408576698