summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_util.h
diff options
context:
space:
mode:
authorinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:40:00 +0000
committerinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:40:00 +0000
commit69ee9c92af91fdad5aabf0f5696cd0432102985f (patch)
treedd6bd42ab4fb07d42fa13a74f0c445b31988148e /chrome/browser/safe_browsing/safe_browsing_util.h
parent87a833ed78a8b1b94f134aa55a7803d53dccb03d (diff)
downloadchromium_src-69ee9c92af91fdad5aabf0f5696cd0432102985f.zip
chromium_src-69ee9c92af91fdad5aabf0f5696cd0432102985f.tar.gz
chromium_src-69ee9c92af91fdad5aabf0f5696cd0432102985f.tar.bz2
Canonicalize the url based on Section 6.1 Safe Browsing Spec.
BUG=7713 TEST=SafeBrowsingUtilTest.CanonicalizeUrl Review URL: http://codereview.chromium.org/1275002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_util.h')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h
index ea58891..ea95a33 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.h
+++ b/chrome/browser/safe_browsing/safe_browsing_util.h
@@ -274,6 +274,13 @@ enum ListType {
int GetListId(const std::string& name);
std::string GetListName(int list_id);
+// Canonicalizes url as per Google Safe Browsing Specification.
+// See section 6.1 in
+// http://code.google.com/p/google-safe-browsing/wiki/Protocolv2Spec.
+void CanonicalizeUrl(const GURL& url, std::string* canonicalized_hostname,
+ std::string* canonicalized_path,
+ std::string* canonicalized_query);
+
// Given a URL, returns all the hosts we need to check. They are returned
// in order of size (i.e. b.c is first, then a.b.c).
void GenerateHostsToCheck(const GURL& url, std::vector<std::string>* hosts);