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

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

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Provides utility structures for inserting a CanonicalCookie into a hash set. 5 // Provides utility structures for inserting a CanonicalCookie into a hash set.
6 // Two cookies are considered equal if their names, domains, and paths are 6 // Two cookies are considered equal if their names, domains, and paths are
7 // equivalent. 7 // equivalent.
8 8
9 #ifndef CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_ 9 #ifndef CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_
10 #define CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_ 10 #define CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_
11 11
12 #include <stddef.h>
13
12 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
13 #include "net/cookies/canonical_cookie.h" 15 #include "net/cookies/canonical_cookie.h"
14 16
15 namespace canonical_cookie { 17 namespace canonical_cookie {
16 18
17 // Returns a fast hash of a cookie, based on its name, domain, and path. 19 // Returns a fast hash of a cookie, based on its name, domain, and path.
18 size_t FastHash(const net::CanonicalCookie& cookie); 20 size_t FastHash(const net::CanonicalCookie& cookie);
19 21
20 struct CanonicalCookieHasher { 22 struct CanonicalCookieHasher {
21 std::size_t operator()(const net::CanonicalCookie& cookie) const { 23 std::size_t operator()(const net::CanonicalCookie& cookie) const {
(...skipping 10 matching lines...) Expand all
32 } 34 }
33 }; 35 };
34 36
35 typedef base::hash_set<net::CanonicalCookie, 37 typedef base::hash_set<net::CanonicalCookie,
36 CanonicalCookieHasher, 38 CanonicalCookieHasher,
37 CanonicalCookieComparer> CookieHashSet; 39 CanonicalCookieComparer> CookieHashSet;
38 40
39 }; // namespace canonical_cookie 41 }; // namespace canonical_cookie
40 42
41 #endif // CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_ 43 #endif // CHROME_BROWSER_BROWSING_DATA_CANONICAL_COOKIE_HASH_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/cache_counter.cc ('k') | chrome/browser/browsing_data/cookies_tree_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698