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 #ifndef IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_
6 #define IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_
8 #include "net/cookies/canonical_cookie.h"
22 // Converts NSHTTPCookie to net::CanonicalCookie.
23 net::CanonicalCookie
CanonicalCookieFromSystemCookie(
25 const base::Time
& ceation_time
);
27 // Converts net::CanonicalCookie to NSHTTPCookie.
28 NSHTTPCookie
* SystemCookieFromCanonicalCookie(
29 const net::CanonicalCookie
& cookie
);
32 COOKIES_READ
, // Cookies have been read from disk.
33 COOKIES_APPLICATION_FOREGROUNDED
// The application has been foregrounded.
36 // Report metrics if the number of cookies drops unexpectedly.
37 void CheckForCookieLoss(size_t cookie_count
, CookieEvent event
);
39 // Reset the cookie count internally used by the CheckForCookieLoss() function.
40 void ResetCookieCountMetrics();
44 #endif // IOS_NET_COOKIES_SYSTEM_COOKIE_UTIL_H_