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 // File stream error reporting. | 5 // File stream error reporting. |
6 | 6 |
7 #ifndef NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ | 7 #ifndef NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ |
8 #define NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ | 8 #define NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 // NetLog parameters when a FileStream has an error. | 18 // NetLog parameters when a FileStream has an error. |
19 class FileStreamErrorParameters : public net::NetLog::EventParameters { | 19 class FileStreamErrorParameters : public net::NetLog::EventParameters { |
20 public: | 20 public: |
21 FileStreamErrorParameters(const std::string& operation, | 21 FileStreamErrorParameters(const std::string& operation, |
22 int os_error, | 22 int os_error, |
23 net::Error net_error); | 23 net::Error net_error); |
24 virtual base::Value* ToValue() const OVERRIDE; | 24 virtual base::Value* ToValue() const OVERRIDE; |
25 | 25 |
| 26 protected: |
| 27 virtual ~FileStreamErrorParameters(); |
| 28 |
26 private: | 29 private: |
27 std::string operation_; | 30 std::string operation_; |
28 int os_error_; | 31 int os_error_; |
29 net::Error net_error_; | 32 net::Error net_error_; |
30 | 33 |
31 DISALLOW_COPY_AND_ASSIGN(FileStreamErrorParameters); | 34 DISALLOW_COPY_AND_ASSIGN(FileStreamErrorParameters); |
32 }; | 35 }; |
33 | 36 |
34 } // namespace net | 37 } // namespace net |
35 | 38 |
36 #endif // NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ | 39 #endif // NET_BASE_FILE_STREAM_NET_LOG_PARAMETERS_H_ |
OLD | NEW |