OLD | NEW |
(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 NET_BASE_MAC_URL_CONVERSIONS_H_ |
| 6 #define NET_BASE_MAC_URL_CONVERSIONS_H_ |
| 7 |
| 8 #include "net/base/net_export.h" |
| 9 |
| 10 class GURL; |
| 11 @class NSURL; |
| 12 |
| 13 namespace net { |
| 14 |
| 15 // This function must only be called on OSX 10.7+ or iOS 4+. |
| 16 // Method for creating a NSURL from a valid GURL. This method will return nil |
| 17 // if the |url| is not valid. |
| 18 // Note that NSURLs should *always* be created from GURLs, so that GURL |
| 19 // sanitization rules are applied everywhere. |
| 20 NET_EXPORT NSURL* NSURLWithGURL(const GURL& url); |
| 21 |
| 22 // This function must only be called on OSX 10.7+ or iOS 4+. |
| 23 // Method for creating a valid GURL from a NSURL. This method will return an |
| 24 // empty GURL if the |url| is nil. |
| 25 NET_EXPORT GURL GURLWithNSURL(NSURL* url); |
| 26 |
| 27 } // namespace net |
| 28 |
| 29 #endif // NET_BASE_MAC_URL_CONVERSIONS_H_ |
OLD | NEW |