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

Side by Side Diff: net/log/net_log.h

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « content/shell/renderer/layout_test/leak_detector.cc ('k') | net/log/net_log.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 (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 NET_LOG_NET_LOG_H_ 5 #ifndef NET_LOG_NET_LOG_H_
6 #define NET_LOG_NET_LOG_H_ 6 #define NET_LOG_NET_LOG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void DeprecatedRemoveObserver(ThreadSafeObserver* observer); 147 void DeprecatedRemoveObserver(ThreadSafeObserver* observer);
148 148
149 // Converts a time to the string format that the NetLog uses to represent 149 // Converts a time to the string format that the NetLog uses to represent
150 // times. Strings are used since integers may overflow. 150 // times. Strings are used since integers may overflow.
151 static std::string TickCountToString(const base::TimeTicks& time); 151 static std::string TickCountToString(const base::TimeTicks& time);
152 152
153 // Returns a C-String symbolic name for |event_type|. 153 // Returns a C-String symbolic name for |event_type|.
154 static const char* EventTypeToString(NetLogEventType event_type); 154 static const char* EventTypeToString(NetLogEventType event_type);
155 155
156 // Returns a dictionary that maps event type symbolic names to their enum 156 // Returns a dictionary that maps event type symbolic names to their enum
157 // values. Caller takes ownership of the returned Value. 157 // values.
158 static base::Value* GetEventTypesAsValue(); 158 static std::unique_ptr<base::Value> GetEventTypesAsValue();
159 159
160 // Returns a C-String symbolic name for |source_type|. 160 // Returns a C-String symbolic name for |source_type|.
161 static const char* SourceTypeToString(NetLogSourceType source_type); 161 static const char* SourceTypeToString(NetLogSourceType source_type);
162 162
163 // Returns a dictionary that maps source type symbolic names to their enum 163 // Returns a dictionary that maps source type symbolic names to their enum
164 // values. Caller takes ownership of the returned Value. 164 // values.
165 static base::Value* GetSourceTypesAsValue(); 165 static std::unique_ptr<base::Value> GetSourceTypesAsValue();
166 166
167 // Returns a C-String symbolic name for |event_phase|. 167 // Returns a C-String symbolic name for |event_phase|.
168 static const char* EventPhaseToString(NetLogEventPhase event_phase); 168 static const char* EventPhaseToString(NetLogEventPhase event_phase);
169 169
170 // Creates a NetLogParametersCallback that encapsulates a single bool. 170 // Creates a NetLogParametersCallback that encapsulates a single bool.
171 // Warning: |name| must remain valid for the life of the callback. 171 // Warning: |name| must remain valid for the life of the callback.
172 static NetLogParametersCallback BoolCallback(const char* name, bool value); 172 static NetLogParametersCallback BoolCallback(const char* name, bool value);
173 173
174 // Warning: |name| must remain valid for the life of the callback. 174 // Warning: |name| must remain valid for the life of the callback.
175 static NetLogParametersCallback IntCallback(const char* name, int value); 175 static NetLogParametersCallback IntCallback(const char* name, int value);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // In practice |observers_| will be very small (<5) so O(n) 231 // In practice |observers_| will be very small (<5) so O(n)
232 // operations on it are fine. 232 // operations on it are fine.
233 std::vector<ThreadSafeObserver*> observers_; 233 std::vector<ThreadSafeObserver*> observers_;
234 234
235 DISALLOW_COPY_AND_ASSIGN(NetLog); 235 DISALLOW_COPY_AND_ASSIGN(NetLog);
236 }; 236 };
237 237
238 } // namespace net 238 } // namespace net
239 239
240 #endif // NET_LOG_NET_LOG_H_ 240 #endif // NET_LOG_NET_LOG_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/leak_detector.cc ('k') | net/log/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698