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

Side by Side Diff: chrome/browser/net/net_log_logger.h

Issue 11828036: First cut at UI for saving net_logs data into a temporary file on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ 5 #ifndef CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
6 #define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ 6 #define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
7 7
8 #include "base/memory/scoped_handle.h" 8 #include "base/memory/scoped_handle.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 10
(...skipping 14 matching lines...) Expand all
25 // If |log_path| is empty or file creation fails, writes to VLOG(1). 25 // If |log_path| is empty or file creation fails, writes to VLOG(1).
26 // Otherwise, writes to |log_path|. Uses one line per entry, for 26 // Otherwise, writes to |log_path|. Uses one line per entry, for
27 // easy parsing. 27 // easy parsing.
28 explicit NetLogLogger(const FilePath &log_path); 28 explicit NetLogLogger(const FilePath &log_path);
29 virtual ~NetLogLogger(); 29 virtual ~NetLogLogger();
30 30
31 // Starts observing specified NetLog. Must not already be watching a NetLog. 31 // Starts observing specified NetLog. Must not already be watching a NetLog.
32 // Separate from constructor to enforce thread safety. 32 // Separate from constructor to enforce thread safety.
33 void StartObserving(net::NetLog* net_log); 33 void StartObserving(net::NetLog* net_log);
34 34
35 // Stops observing net_log(). Must already be watching.
36 void StopObserving();
37
35 // net::NetLog::ThreadSafeObserver implementation: 38 // net::NetLog::ThreadSafeObserver implementation:
36 virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE; 39 virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
37 40
38 private: 41 private:
39 ScopedStdioHandle file_; 42 ScopedStdioHandle file_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(NetLogLogger); 44 DISALLOW_COPY_AND_ASSIGN(NetLogLogger);
42 }; 45 };
43 46
44 #endif // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ 47 #endif // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698