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

Side by Side Diff: net/cookies/cookie_options.h

Issue 1409243003: Revert of Implement $Secure- cookie prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_options.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 void set_exclude_httponly() { exclude_httponly_ = true; } 28 void set_exclude_httponly() { exclude_httponly_ = true; }
29 void set_include_httponly() { exclude_httponly_ = false; } 29 void set_include_httponly() { exclude_httponly_ = false; }
30 bool exclude_httponly() const { return exclude_httponly_; } 30 bool exclude_httponly() const { return exclude_httponly_; }
31 31
32 void set_include_first_party_only() { include_first_party_only_ = true; } 32 void set_include_first_party_only() { include_first_party_only_ = true; }
33 bool include_first_party_only() const { return include_first_party_only_; } 33 bool include_first_party_only() const { return include_first_party_only_; }
34 34
35 void set_first_party_url(const GURL& url) { first_party_url_ = url; } 35 void set_first_party_url(const GURL& url) { first_party_url_ = url; }
36 GURL first_party_url() const { return first_party_url_; } 36 GURL first_party_url() const { return first_party_url_; }
37 37
38 // TODO(estark): Remove once we decide whether to ship cookie
39 // prefixes. https://crbug.com/541511
40 void set_enforce_prefixes() { enforce_prefixes_ = true; }
41 bool enforce_prefixes() const { return enforce_prefixes_; }
42
43 // |server_time| indicates what the server sending us the Cookie thought the 38 // |server_time| indicates what the server sending us the Cookie thought the
44 // current time was when the cookie was produced. This is used to adjust for 39 // current time was when the cookie was produced. This is used to adjust for
45 // clock skew between server and host. 40 // clock skew between server and host.
46 void set_server_time(const base::Time& server_time) { 41 void set_server_time(const base::Time& server_time) {
47 server_time_ = server_time; 42 server_time_ = server_time;
48 } 43 }
49 bool has_server_time() const { return !server_time_.is_null(); } 44 bool has_server_time() const { return !server_time_.is_null(); }
50 base::Time server_time() const { return server_time_; } 45 base::Time server_time() const { return server_time_; }
51 46
52 private: 47 private:
53 bool exclude_httponly_; 48 bool exclude_httponly_;
54 bool include_first_party_only_; 49 bool include_first_party_only_;
55 GURL first_party_url_; 50 GURL first_party_url_;
56 bool enforce_prefixes_;
57 base::Time server_time_; 51 base::Time server_time_;
58 }; 52 };
59 53
60 } // namespace net 54 } // namespace net
61 55
62 #endif // NET_COOKIES_COOKIE_OPTIONS_H_ 56 #endif // NET_COOKIES_COOKIE_OPTIONS_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698