url_util.cc 461 B

123456789101112131415161718
  1. // Copyright 2013 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. #include "ios/web/common/url_util.h"
  5. namespace web {
  6. GURL GURLByRemovingRefFromGURL(const GURL& full_url) {
  7. if (!full_url.has_ref())
  8. return full_url;
  9. GURL::Replacements replacements;
  10. replacements.ClearRef();
  11. return full_url.ReplaceComponents(replacements);
  12. }
  13. } // namespace web