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

Side by Side Diff: ios/net/protocol_handler_util.h

Issue 994823004: [iOS] Upstream //ios/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
(Empty)
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.
4
5 #ifndef IOS_NET_PROTOCOL_HANDLER_UTIL_H_
6 #define IOS_NET_PROTOCOL_HANDLER_UTIL_H_
7
8 #import <Foundation/Foundation.h>
9
10 namespace base {
11 class Time;
12 } // namespace base
13
14 namespace net {
15 class URLRequest;
16 } // namespace net
17
18 namespace net {
19
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);
28
29 // Builds a NSURLResponse from the response data in |request|.
30 NSURLResponse* GetNSURLResponseForRequest(URLRequest* request);
31
32 // Copy HTTP headers from |in_request| to |out_request|.
33 void CopyHttpHeaders(NSURLRequest* in_request, URLRequest* out_request);
34
35 } // namespace protocol_handler_util
36
37 #endif // IOS_NET_PROTOCOL_HANDLER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698