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

Side by Side Diff: components/history/core/browser/history_match.cc

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/history/core/browser/history_match.h" 5 #include "components/history/core/browser/history_match.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace history { 9 namespace history {
10 10
(...skipping 14 matching lines...) Expand all
25 innermost_match(innermost_match) { 25 innermost_match(innermost_match) {
26 } 26 }
27 27
28 bool HistoryMatch::EqualsGURL(const HistoryMatch& h, const GURL& url) { 28 bool HistoryMatch::EqualsGURL(const HistoryMatch& h, const GURL& url) {
29 return h.url_info.url() == url; 29 return h.url_info.url() == url;
30 } 30 }
31 31
32 bool HistoryMatch::IsHostOnly() const { 32 bool HistoryMatch::IsHostOnly() const {
33 const GURL& gurl = url_info.url(); 33 const GURL& gurl = url_info.url();
34 DCHECK(gurl.is_valid()); 34 DCHECK(gurl.is_valid());
35 return (!gurl.has_path() || (gurl.path() == "/")) && !gurl.has_query() && 35 return (!gurl.has_path() || (gurl.path_piece() == "/")) &&
36 !gurl.has_ref(); 36 !gurl.has_query() && !gurl.has_ref();
37 } 37 }
38 38
39 } // namespace history 39 } // namespace history
OLDNEW
« no previous file with comments | « components/cloud_devices/common/cloud_devices_urls.cc ('k') | components/history/core/browser/url_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698