Index: net/base/mac/url_conversions.h |
diff --git a/net/base/mac/url_conversions.h b/net/base/mac/url_conversions.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7b0970f7056b47bf25e2151c2fed59bc34d9fe9c |
--- /dev/null |
+++ b/net/base/mac/url_conversions.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_BASE_MAC_URL_CONVERSIONS_H_ |
+#define NET_BASE_MAC_URL_CONVERSIONS_H_ |
+ |
+#include "net/base/net_export.h" |
+ |
+class GURL; |
+@class NSURL; |
+ |
+namespace net { |
+ |
+// This function must only be called on OSX 10.7+ or iOS 4+. |
+// Method for creating a NSURL from a valid GURL. This method will return nil |
+// if the |url| is not valid. |
+// Note that NSURLs should *always* be created from GURLs, so that GURL |
+// sanitization rules are applied everywhere. |
+NET_EXPORT NSURL* NSURLWithGURL(const GURL& url); |
+ |
+// This function must only be called on OSX 10.7+ or iOS 4+. |
+// Method for creating a valid GURL from a NSURL. This method will return an |
+// empty GURL if the |url| is nil. |
+NET_EXPORT GURL GURLWithNSURL(NSURL* url); |
+ |
+} // namespace net |
+ |
+#endif // NET_BASE_MAC_URL_CONVERSIONS_H_ |