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

Unified Diff: url/mac/url_conversions.h

Issue 719783005: Upstream "nsurl_util.{h,mm}" from Chrome on iOS repository. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from droger. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « url/mac/README ('k') | url/mac/url_conversions.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/mac/url_conversions.h
diff --git a/url/mac/url_conversions.h b/url/mac/url_conversions.h
new file mode 100644
index 0000000000000000000000000000000000000000..6340ae8f97365cc2a793df2097b92b223926c38d
--- /dev/null
+++ b/url/mac/url_conversions.h
@@ -0,0 +1,25 @@
+// 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 URL_MAC_URL_CONVERSIONS_H_
+#define URL_MAC_URL_CONVERSIONS_H_
+
+#include "url/url_export.h"
+
+class GURL;
+@class NSURL;
+
+// 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.
+URL_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.
+URL_EXPORT GURL GURLWithNSURL(NSURL* url);
+
+#endif // URL_MAC_URL_CONVERSIONS_H_
« no previous file with comments | « url/mac/README ('k') | url/mac/url_conversions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698