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

Side by Side Diff: chrome/browser/browsing_data/canonical_cookie_hash.cc

Issue 454623003: Store in memory cookies in a hash set instead of a list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix total ordering. Created 6 years, 4 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 // 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.
4
5 #include "chrome/browser/browsing_data/canonical_cookie_hash.h"
6
7 #include "base/hash.h"
8
9 namespace canonical_cookie {
10
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());
16 }
17
18 }; // namespace canonical_cookie
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698