Chromium Code Reviews| Index: net/base/file_stream_posix.cc |
| =================================================================== |
| --- net/base/file_stream_posix.cc (revision 141407) |
| +++ net/base/file_stream_posix.cc (working copy) |
| @@ -57,12 +57,11 @@ |
| const net::BoundNetLog& bound_net_log) { |
| net::Error net_error = MapSystemError(error); |
| + std::string error_name = GetFileErrorSourceName(source); |
|
eroman
2012/06/11 23:42:25
Not a big deal either way since this is an error l
mmenke
2012/06/12 00:42:19
Done.
|
| bound_net_log.AddEvent( |
| net::NetLog::TYPE_FILE_STREAM_ERROR, |
| - make_scoped_refptr( |
| - new FileStreamErrorParameters(GetFileErrorSourceName(source), |
| - error, |
| - net_error))); |
| + base::Bind(&NetLogFileStreamErrorCallback, |
| + &error_name, error, net_error)); |
| RecordFileError(error, source, record_uma); |
| @@ -77,11 +76,10 @@ |
| base::PlatformFile* file, |
| int* result, |
| const net::BoundNetLog& bound_net_log) { |
| + std::string file_name = path.AsUTF8Unsafe(); |
| bound_net_log.BeginEvent( |
| net::NetLog::TYPE_FILE_STREAM_OPEN, |
| - make_scoped_refptr( |
| - new net::NetLogStringParameter("file_name", |
| - path.AsUTF8Unsafe()))); |
| + NetLog::StringCallback("file_name", &file_name)); |
|
eroman
2012/06/11 23:42:25
Can you take address to to path.AsUTF8Unsafe() dir
mmenke
2012/06/12 00:42:19
The compiler doesn't barf.
I had assumed temporar
mmenke
2012/06/12 00:50:58
Correction...MSVC doesn't barf, and the string app
|
| *result = OK; |
| *file = base::CreatePlatformFile(path, open_flags, NULL, NULL); |
| @@ -615,15 +613,11 @@ |
| bound_net_log_.AddEvent( |
| net::NetLog::TYPE_FILE_STREAM_BOUND_TO_OWNER, |
| - make_scoped_refptr( |
| - new net::NetLogSourceParameter("source_dependency", |
| - owner_bound_net_log.source()))); |
| + owner_bound_net_log.source().ToEventParametersCallback()); |
| owner_bound_net_log.AddEvent( |
| net::NetLog::TYPE_FILE_STREAM_SOURCE, |
| - make_scoped_refptr( |
| - new net::NetLogSourceParameter("source_dependency", |
| - bound_net_log_.source()))); |
| + bound_net_log_.source().ToEventParametersCallback()); |
| } |
| base::PlatformFile FileStreamPosix::GetPlatformFileForTesting() { |