OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file's dependencies should be kept to a minimum so that it can be | 5 // This file's dependencies should be kept to a minimum so that it can be |
6 // included in WebKit code that doesn't rely on much of common. | 6 // included in WebKit code that doesn't rely on much of common. |
7 | 7 |
8 #ifndef NET_URL_REQUEST_URL_REQUEST_STATUS_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_STATUS_H_ |
9 #define NET_URL_REQUEST_URL_REQUEST_STATUS_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_STATUS_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
| 12 namespace net { |
| 13 |
12 // Represents the result of a URL request. It encodes errors and various | 14 // Represents the result of a URL request. It encodes errors and various |
13 // types of success. | 15 // types of success. |
14 class URLRequestStatus { | 16 class URLRequestStatus { |
15 public: | 17 public: |
16 enum Status { | 18 enum Status { |
17 // Request succeeded, os_error() will be 0. | 19 // Request succeeded, os_error() will be 0. |
18 SUCCESS = 0, | 20 SUCCESS = 0, |
19 | 21 |
20 // An IO request is pending, and the caller will be informed when it is | 22 // An IO request is pending, and the caller will be informed when it is |
21 // completed. | 23 // completed. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 59 |
58 private: | 60 private: |
59 // Application level status | 61 // Application level status |
60 Status status_; | 62 Status status_; |
61 | 63 |
62 // Error code from the operating system network layer if an error was | 64 // Error code from the operating system network layer if an error was |
63 // encountered | 65 // encountered |
64 int os_error_; | 66 int os_error_; |
65 }; | 67 }; |
66 | 68 |
| 69 } // namespace net |
| 70 |
| 71 // TODO(tfarina): Fix the callers and remove this! |
| 72 typedef net::URLRequestStatus URLRequestStatus; |
| 73 |
67 #endif // NET_URL_REQUEST_URL_REQUEST_STATUS_H_ | 74 #endif // NET_URL_REQUEST_URL_REQUEST_STATUS_H_ |
OLD | NEW |