OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Brought to you by number 42. | 5 // Brought to you by number 42. |
6 | 6 |
7 #ifndef NET_COOKIES_COOKIE_OPTIONS_H_ | 7 #ifndef NET_COOKIES_COOKIE_OPTIONS_H_ |
8 #define NET_COOKIES_COOKIE_OPTIONS_H_ | 8 #define NET_COOKIES_COOKIE_OPTIONS_H_ |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // |server_time| indicates what the server sending us the Cookie thought the | 53 // |server_time| indicates what the server sending us the Cookie thought the |
54 // current time was when the cookie was produced. This is used to adjust for | 54 // current time was when the cookie was produced. This is used to adjust for |
55 // clock skew between server and host. | 55 // clock skew between server and host. |
56 void set_server_time(const base::Time& server_time) { | 56 void set_server_time(const base::Time& server_time) { |
57 server_time_ = server_time; | 57 server_time_ = server_time; |
58 } | 58 } |
59 bool has_server_time() const { return !server_time_.is_null(); } | 59 bool has_server_time() const { return !server_time_.is_null(); } |
60 base::Time server_time() const { return server_time_; } | 60 base::Time server_time() const { return server_time_; } |
61 | 61 |
| 62 void set_update_access_time() { update_access_time_ = true; } |
62 void set_do_not_update_access_time() { update_access_time_ = false; } | 63 void set_do_not_update_access_time() { update_access_time_ = false; } |
63 bool update_access_time() const { return update_access_time_; } | 64 bool update_access_time() const { return update_access_time_; } |
64 | 65 |
65 private: | 66 private: |
66 bool exclude_httponly_; | 67 bool exclude_httponly_; |
67 SameSiteCookieMode same_site_cookie_mode_; | 68 SameSiteCookieMode same_site_cookie_mode_; |
68 bool update_access_time_; | 69 bool update_access_time_; |
69 base::Time server_time_; | 70 base::Time server_time_; |
70 }; | 71 }; |
71 | 72 |
72 } // namespace net | 73 } // namespace net |
73 | 74 |
74 #endif // NET_COOKIES_COOKIE_OPTIONS_H_ | 75 #endif // NET_COOKIES_COOKIE_OPTIONS_H_ |
OLD | NEW |