offline_page_item_utils.h 803 B

123456789101112131415161718192021
  1. // Copyright 2019 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 COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_UTILS_H_
  5. #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_UTILS_H_
  6. class GURL;
  7. namespace offline_pages {
  8. // Returns true if two URLs are equal, ignoring the fragment.
  9. // Because offline page items are stored without fragment, this is appropriate
  10. // for checking if an offline item's URL matches another URL.
  11. bool EqualsIgnoringFragment(const GURL& lhs, const GURL& rhs);
  12. // Strips any fragment from |url| and returns the result.
  13. GURL UrlWithoutFragment(const GURL& url);
  14. } // namespace offline_pages
  15. #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_UTILS_H_