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

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

Issue 2246613003: Update cookie value and attribute setting behavior to match other UAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Simplification Created 4 years, 4 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_store_unittest.h ('k') | net/cookies/parsed_cookie.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 #ifndef NET_COOKIES_PARSED_COOKIE_H_ 5 #ifndef NET_COOKIES_PARSED_COOKIE_H_
6 #define NET_COOKIES_PARSED_COOKIE_H_ 6 #define NET_COOKIES_PARSED_COOKIE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 std::string ToCookieLine() const; 77 std::string ToCookieLine() const;
78 78
79 // Returns an iterator pointing to the first terminator character found in 79 // Returns an iterator pointing to the first terminator character found in
80 // the given string. 80 // the given string.
81 static std::string::const_iterator FindFirstTerminator(const std::string& s); 81 static std::string::const_iterator FindFirstTerminator(const std::string& s);
82 82
83 // Given iterators pointing to the beginning and end of a string segment, 83 // Given iterators pointing to the beginning and end of a string segment,
84 // returns as output arguments token_start and token_end to the start and end 84 // returns as output arguments token_start and token_end to the start and end
85 // positions of a cookie attribute token name parsed from the segment, and 85 // positions of a cookie attribute token name parsed from the segment, and
86 // updates the segment iterator to point to the next segment to be parsed. 86 // updates the segment iterator to point to the next segment to be parsed.
87 // If no token is found, the function returns false. 87 // If no token is found, the function returns false and the segment iterator
88 // is set to end.
88 static bool ParseToken(std::string::const_iterator* it, 89 static bool ParseToken(std::string::const_iterator* it,
89 const std::string::const_iterator& end, 90 const std::string::const_iterator& end,
90 std::string::const_iterator* token_start, 91 std::string::const_iterator* token_start,
91 std::string::const_iterator* token_end); 92 std::string::const_iterator* token_end);
92 93
93 // Given iterators pointing to the beginning and end of a string segment, 94 // Given iterators pointing to the beginning and end of a string segment,
94 // returns as output arguments value_start and value_end to the start and end 95 // returns as output arguments value_start and value_end to the start and end
95 // positions of a cookie attribute value parsed from the segment, and updates 96 // positions of a cookie attribute value parsed from the segment, and updates
96 // the segment iterator to point to the next segment to be parsed. 97 // the segment iterator to point to the next segment to be parsed.
97 static void ParseValue(std::string::const_iterator* it, 98 static void ParseValue(std::string::const_iterator* it,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 size_t httponly_index_; 147 size_t httponly_index_;
147 size_t same_site_index_; 148 size_t same_site_index_;
148 size_t priority_index_; 149 size_t priority_index_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(ParsedCookie); 151 DISALLOW_COPY_AND_ASSIGN(ParsedCookie);
151 }; 152 };
152 153
153 } // namespace net 154 } // namespace net
154 155
155 #endif // NET_COOKIES_COOKIE_MONSTER_H_ 156 #endif // NET_COOKIES_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_store_unittest.h ('k') | net/cookies/parsed_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698