| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |