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

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

Issue 10694093: Remove the force_session cookie option, as it's not used anymore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/url_request/url_request_test_util.h » ('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 #pragma once 9 #pragma once
10 10
11 namespace net { 11 namespace net {
12 12
13 class CookieOptions { 13 class CookieOptions {
14 public: 14 public:
15 // Default is to exclude httponly, which means: 15 // Default is to exclude httponly, which means:
16 // - reading operations will not return httponly cookies. 16 // - reading operations will not return httponly cookies.
17 // - writing operations will not write httponly cookies. 17 // - writing operations will not write httponly cookies.
18 CookieOptions() 18 CookieOptions()
19 : exclude_httponly_(true), 19 : exclude_httponly_(true) {
20 force_session_(false) {
21 } 20 }
22 21
23 void set_exclude_httponly() { exclude_httponly_ = true; } 22 void set_exclude_httponly() { exclude_httponly_ = true; }
24 void set_include_httponly() { exclude_httponly_ = false; } 23 void set_include_httponly() { exclude_httponly_ = false; }
25 bool exclude_httponly() const { return exclude_httponly_; } 24 bool exclude_httponly() const { return exclude_httponly_; }
26 25
27 // Forces a cookie to be saved as a session cookie. If the expiration time of
28 // the cookie is in the past, i.e. the cookie would end up being deleted, this
29 // option is ignored. See CookieMonsterTest.ForceSessionOnly.
30 void set_force_session() { force_session_ = true; }
31 bool force_session() const { return force_session_; }
32
33 private: 26 private:
34 bool exclude_httponly_; 27 bool exclude_httponly_;
35 bool force_session_;
36 }; 28 };
37 } // namespace net 29 } // namespace net
38 30
39 #endif // NET_COOKIES_COOKIE_OPTIONS_H_ 31 #endif // NET_COOKIES_COOKIE_OPTIONS_H_
40 32
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698