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

Side by Side Diff: ios/net/cookies/system_cookie_util.h

Issue 994823004: [iOS] Upstream //ios/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
(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 #ifndef IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_
6 #define IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_
7
8 #include "net/cookies/canonical_cookie.h"
9
10 #if defined(__OBJC__)
11 @class NSHTTPCookie;
12 #else
13 class NSHTTPCookie;
14 #endif
15
16 namespace base {
17 class Time;
18 }
19
20 namespace net {
21
22 // Converts NSHTTPCookie to net::CanonicalCookie.
23 net::CanonicalCookie CanonicalCookieFromSystemCookie(
24 NSHTTPCookie* cookie,
25 const base::Time& ceation_time);
26
27 // Converts net::CanonicalCookie to NSHTTPCookie.
28 NSHTTPCookie* SystemCookieFromCanonicalCookie(
29 const net::CanonicalCookie& cookie);
30
31 enum CookieEvent {
32 COOKIES_READ, // Cookies have been read from disk.
33 COOKIES_APPLICATION_FOREGROUNDED // The application has been foregrounded.
34 };
35
36 // Report metrics if the number of cookies drops unexpectedly.
37 void CheckForCookieLoss(size_t cookie_count, CookieEvent event);
38
39 // Reset the cookie count internally used by the CheckForCookieLoss() function.
40 void ResetCookieCountMetrics();
41
42 } // namespace net
43
44 #endif // IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698