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

Side by Side Diff: chrome/common/search/search_urls.h

Issue 2898313003: Ensure the NTP ServiceWorker has the proper site URL (Closed)
Patch Set: Rebase + addressed comments Created 3 years, 6 months 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
« no previous file with comments | « chrome/browser/search/search_unittest.cc ('k') | chrome/common/search/search_urls.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « chrome/browser/search/search_unittest.cc ('k') | chrome/common/search/search_urls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698