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
3 // found in the LICENSE file.
5 #include "chrome/browser/browsing_data/canonical_cookie_hash.h"
9 namespace canonical_cookie
{
11 size_t FastHash(const net::CanonicalCookie
& cookie
) {
12 return base::SuperFastHash(cookie
.Name().c_str(), cookie
.Name().size()) +
13 3 * base::SuperFastHash(cookie
.Domain().c_str(),
14 cookie
.Domain().size()) +
15 7 * base::SuperFastHash(cookie
.Path().c_str(), cookie
.Path().size());
18 }; // namespace canonical_cookie