url_scheme_util.h 862 B

12345678910111213141516171819202122232425
  1. // Copyright 2014 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. #ifndef IOS_WEB_COMMON_URL_SCHEME_UTIL_H_
  5. #define IOS_WEB_COMMON_URL_SCHEME_UTIL_H_
  6. class GURL;
  7. @class NSURL;
  8. namespace web {
  9. // Returns true if the URL has a www content scheme, i.e. http, https or data.
  10. bool UrlHasWebScheme(const GURL& url);
  11. // NOTE: Use these methods only in an NSURL-only context. Otherwise, use
  12. // GURL's IsScheme, or the GURL version of UrlHasWebScheme.
  13. // These functions will always return the same thing that the equivalent
  14. // GURL call would return (assuming the URL is a valid GURL).
  15. // Returns true if the URL has a www content scheme, i.e. http, https or data.
  16. bool UrlHasWebScheme(NSURL* url);
  17. } // namespace web
  18. #endif // IOS_WEB_COMMON_URL_SCHEME_UTIL_H_