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

Unified Diff: net/base/file_stream_posix.cc

Issue 10539094: NetLogEventParameter to Callback refactoring 1, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix headers Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698