Chromium Code Reviews| 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..f4d3eaf2682d8eef2207897279f4ea2d6ad335da |
| --- /dev/null |
| +++ b/url/mac/url_conversions.h |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
droger
2014/11/13 23:37:12
Nit: Not sure if this is important, but we should
erikchen
2014/11/13 23:41:25
Done.
|
| +// 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_ |