OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Returns a C-String symbolic name for |source_type|. | 254 // Returns a C-String symbolic name for |source_type|. |
255 static const char* SourceTypeToString(SourceType source_type); | 255 static const char* SourceTypeToString(SourceType source_type); |
256 | 256 |
257 // Returns a dictionary that maps source type symbolic names to their enum | 257 // Returns a dictionary that maps source type symbolic names to their enum |
258 // values. Caller takes ownership of the returned Value. | 258 // values. Caller takes ownership of the returned Value. |
259 static base::Value* GetSourceTypesAsValue(); | 259 static base::Value* GetSourceTypesAsValue(); |
260 | 260 |
261 // Returns a C-String symbolic name for |event_phase|. | 261 // Returns a C-String symbolic name for |event_phase|. |
262 static const char* EventPhaseToString(EventPhase event_phase); | 262 static const char* EventPhaseToString(EventPhase event_phase); |
263 | 263 |
264 // Creates a ParametersCallback that encapsulates a single integer. | 264 // Creates a ParametersCallback that encapsulates a single bool. |
| 265 // Warning: |name| must remain valid for the life of the callback. |
| 266 static ParametersCallback BoolCallback(const char* name, bool value); |
| 267 |
265 // Warning: |name| must remain valid for the life of the callback. | 268 // Warning: |name| must remain valid for the life of the callback. |
266 // TODO(mmenke): Rename this to be consistent with Int64Callback. | 269 // TODO(mmenke): Rename this to be consistent with Int64Callback. |
267 static ParametersCallback IntegerCallback(const char* name, int value); | 270 static ParametersCallback IntegerCallback(const char* name, int value); |
268 | 271 |
269 // Creates a ParametersCallback that encapsulates a single int64. The | 272 // Creates a ParametersCallback that encapsulates a single int64. The |
270 // callback will return the value as a StringValue, since IntegerValues | 273 // callback will return the value as a StringValue, since IntegerValues |
271 // only support 32-bit values. | 274 // only support 32-bit values. |
272 // Warning: |name| must remain valid for the life of the callback. | 275 // Warning: |name| must remain valid for the life of the callback. |
273 static ParametersCallback Int64Callback(const char* name, int64 value); | 276 static ParametersCallback Int64Callback(const char* name, int64 value); |
274 | 277 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 NetLog::Source source_; | 387 NetLog::Source source_; |
385 NetLog* net_log_; | 388 NetLog* net_log_; |
386 | 389 |
387 // TODO(eroman): Temporary until crbug.com/467797 is solved. | 390 // TODO(eroman): Temporary until crbug.com/467797 is solved. |
388 Liveness liveness_ = ALIVE; | 391 Liveness liveness_ = ALIVE; |
389 }; | 392 }; |
390 | 393 |
391 } // namespace net | 394 } // namespace net |
392 | 395 |
393 #endif // NET_LOG_NET_LOG_H_ | 396 #endif // NET_LOG_NET_LOG_H_ |
OLD | NEW |