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

Unified Diff: net/base/file_stream_win.cc

Issue 10539094: NetLogEventParameter to Callback refactoring 1, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unneeded line 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_win.cc
===================================================================
--- net/base/file_stream_win.cc (revision 141407)
+++ net/base/file_stream_win.cc (working copy)
@@ -48,10 +48,8 @@
bound_net_log.AddEvent(
net::NetLog::TYPE_FILE_STREAM_ERROR,
- make_scoped_refptr(
- new FileStreamErrorParameters(GetFileErrorSourceName(source),
- error,
- net_error)));
+ base::Bind(&NetLogFileStreamErrorCallback,
+ source, error, net_error));
RecordFileError(error, source, record_uma);
@@ -66,11 +64,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));
*file = base::CreatePlatformFile(path, open_flags, NULL, NULL);
if (*file == base::kInvalidPlatformFileValue) {
@@ -656,15 +653,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 FileStreamWin::GetPlatformFileForTesting() {

Powered by Google App Engine
This is Rietveld 408576698