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

Side by Side Diff: net/base/net_log_logger.h

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/base/net_info_source_list.h ('k') | net/base/net_log_logger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 NET_BASE_NET_LOG_LOGGER_H_ 5 #ifndef NET_BASE_NET_LOG_LOGGER_H_
6 #define NET_BASE_NET_LOG_LOGGER_H_ 6 #define NET_BASE_NET_LOG_LOGGER_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "net/base/net_log.h" 12 #include "net/base/net_log.h"
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue;
15 class FilePath; 16 class FilePath;
16 class Value; 17 class Value;
17 } 18 }
18 19
19 namespace net { 20 namespace net {
20 21
21 // NetLogLogger watches the NetLog event stream, and sends all entries to 22 // NetLogLogger watches the NetLog event stream, and sends all entries to
22 // a file specified on creation. 23 // a file specified on creation.
23 // 24 //
24 // The text file will contain a single JSON object. 25 // The text file will contain a single JSON object.
(...skipping 13 matching lines...) Expand all
38 void StartObserving(NetLog* net_log); 39 void StartObserving(NetLog* net_log);
39 40
40 // Stops observing net_log(). Must already be watching. 41 // Stops observing net_log(). Must already be watching.
41 void StopObserving(); 42 void StopObserving();
42 43
43 // net::NetLog::ThreadSafeObserver implementation: 44 // net::NetLog::ThreadSafeObserver implementation:
44 void OnAddEntry(const NetLog::Entry& entry) override; 45 void OnAddEntry(const NetLog::Entry& entry) override;
45 46
46 // Create a dictionary containing legend for net/ constants. Caller takes 47 // Create a dictionary containing legend for net/ constants. Caller takes
47 // ownership of returned value. 48 // ownership of returned value.
49 // TODO(mmenke): Get rid of this, and have embedders use GetNetConstants
50 // directly. Also maybe call that function by default, so only embedders
51 // that need more constants need to worry about it.
48 static base::DictionaryValue* GetConstants(); 52 static base::DictionaryValue* GetConstants();
49 53
50 private: 54 private:
51 base::ScopedFILE file_; 55 base::ScopedFILE file_;
52 56
53 // The LogLevel to log at. 57 // The LogLevel to log at.
54 NetLog::LogLevel log_level_; 58 NetLog::LogLevel log_level_;
55 59
56 // True if OnAddEntry() has been called at least once. 60 // True if OnAddEntry() has been called at least once.
57 bool added_events_; 61 bool added_events_;
58 62
59 DISALLOW_COPY_AND_ASSIGN(NetLogLogger); 63 DISALLOW_COPY_AND_ASSIGN(NetLogLogger);
60 }; 64 };
61 65
62 } // namespace net 66 } // namespace net
63 67
64 #endif // NET_BASE_NET_LOG_LOGGER_H_ 68 #endif // NET_BASE_NET_LOG_LOGGER_H_
OLDNEW
« no previous file with comments | « net/base/net_info_source_list.h ('k') | net/base/net_log_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698