OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_COMMON_SEARCH_SEARCH_URLS_H_ | 5 #ifndef CHROME_COMMON_SEARCH_SEARCH_URLS_H_ |
6 #define CHROME_COMMON_SEARCH_SEARCH_URLS_H_ | 6 #define CHROME_COMMON_SEARCH_SEARCH_URLS_H_ |
7 | 7 |
8 class GURL; | 8 class GURL; |
9 | 9 |
10 namespace search { | 10 namespace search { |
11 | 11 |
12 // Returns true if |my_url| matches |other_url| in terms of origin (i.e. host, | 12 // Returns true if |my_url| matches |other_url| in terms of origin (i.e. host, |
13 // port, and scheme) and path. As a special case, this also matches if |my_url| | 13 // port, and scheme) and path. As a special case, this also matches if |my_url| |
14 // is "https://" and |other_url| is "http://" (and host, port, and path match). | 14 // is "https://" and |other_url| is "http://" (and host, port, and path match). |
15 // This is so that "https://" URLs will be considered "Instant URLs" even if the | 15 // This is so that "https://" URLs will be considered "Instant URLs" even if the |
16 // default search provider URL is "http://". | 16 // default search provider URL is "http://". |
17 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); | 17 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); |
18 | 18 |
| 19 bool IsMatchingServiceWorker(const GURL& my_url, const GURL& document_url); |
| 20 |
19 } // namespace search | 21 } // namespace search |
20 | 22 |
21 #endif // CHROME_COMMON_SEARCH_SEARCH_URLS_H_ | 23 #endif // CHROME_COMMON_SEARCH_SEARCH_URLS_H_ |
OLD | NEW |