[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / ios / net / protocol_handler_util.h
blobf2a1e8ddabbaddc4ec4f31a29d04018a64fe7c6e
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_NET_PROTOCOL_HANDLER_UTIL_H_
6 #define IOS_NET_PROTOCOL_HANDLER_UTIL_H_
8 #import <Foundation/Foundation.h>
10 namespace base {
11 class Time;
12 } // namespace base
14 namespace net {
15 class URLRequest;
16 } // namespace net
18 namespace net {
20 // Creates a network NSError. |ns_error_code| is the iOS error code,
21 // |net_error_code| is the network error from net/base/net_error_list.h.
22 // |creation_time| is the time when the failing request was started and must be
23 // valid.
24 NSError* GetIOSError(NSInteger ns_error_code,
25 int net_error_code,
26 NSString* url,
27 const base::Time& creation_time);
29 // Builds a NSURLResponse from the response data in |request|.
30 NSURLResponse* GetNSURLResponseForRequest(URLRequest* request);
32 // Copy HTTP headers from |in_request| to |out_request|.
33 void CopyHttpHeaders(NSURLRequest* in_request, URLRequest* out_request);
35 } // namespace protocol_handler_util
37 #endif // IOS_NET_PROTOCOL_HANDLER_UTIL_H_