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

Side by Side Diff: net/base/file_stream_net_log_parameters.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 unified diff | Download patch | Annotate | Revision Log
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 #include "net/base/file_stream_net_log_parameters.h" 5 #include "net/base/file_stream_net_log_parameters.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 FileStreamErrorParameters::FileStreamErrorParameters( 11 base::Value* NetLogFileStreamErrorCallback(
12 const std::string& operation, int os_error, net::Error net_error) 12 FileErrorSource source,
13 : operation_(operation), os_error_(os_error), net_error_(net_error) { 13 int os_error,
14 } 14 net::Error net_error,
15 15 NetLog::LogLevel /* log_level */) {
16 FileStreamErrorParameters::~FileStreamErrorParameters() {}
17
18 Value* FileStreamErrorParameters::ToValue() const {
19 DictionaryValue* dict = new DictionaryValue(); 16 DictionaryValue* dict = new DictionaryValue();
20 17
21 dict->SetString("operation", operation_); 18 dict->SetString("operation", GetFileErrorSourceName(source));
22 dict->SetInteger("os_error", os_error_); 19 dict->SetInteger("os_error", os_error);
23 dict->SetInteger("net_error", net_error_); 20 dict->SetInteger("net_error", net_error);
24 21
25 return dict; 22 return dict;
26 } 23 }
27 24
28 } // namespace net 25 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698