Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / browsing_data / canonical_cookie_hash.cc
blob218555eb2b8ece422912a16fa0f756728df0ecea
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"
7 #include "base/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