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

Side by Side Diff: chrome/common/search_urls.cc

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing files. Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #include "chrome/common/search_urls.h"
2
3 #include "content/public/common/url_constants.h"
4 #include "url/gurl.h"
5
6 namespace search {
7 namespace {
8 bool MatchesOrigin(const GURL& my_url, const GURL& other_url) {
9 return my_url.host() == other_url.host() &&
10 my_url.port() == other_url.port() &&
11 (my_url.scheme() == other_url.scheme() ||
12 (my_url.SchemeIs(content::kHttpsScheme) &&
13 other_url.SchemeIs(chrome::kHttpScheme)));
14 }
15 } // namespace
16
17 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url) {
18 return MatchesOrigin(my_url, other_url) && my_url.path() == other_url.path();
19 }
20 } // namespace search
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698