• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 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.
4 
5 #include "webkit/glue/webcookie.h"
6 
7 namespace webkit_glue {
8 
WebCookie()9 WebCookie::WebCookie()
10     : expires(0),
11       http_only(false),
12       secure(false),
13       session(false) {
14 }
15 
WebCookie(const net::CookieMonster::CanonicalCookie & c)16 WebCookie::WebCookie(const net::CookieMonster::CanonicalCookie& c)
17     : name(c.Name()),
18       value(c.Value()),
19       domain(c.Domain()),
20       path(c.Path()),
21       expires(c.ExpiryDate().ToDoubleT() * 1000),
22       http_only(c.IsHttpOnly()),
23       secure(c.IsSecure()),
24       session(!c.IsPersistent()) {
25 }
26 
WebCookie(const std::string & name,const std::string & value,const std::string & domain,const std::string & path,double expires,bool http_only,bool secure,bool session)27 WebCookie::WebCookie(const std::string& name, const std::string& value,
28                      const std::string& domain, const std::string& path,
29                      double expires, bool http_only, bool secure, bool session)
30     : name(name),
31       value(value),
32       domain(domain),
33       path(path),
34       expires(expires),
35       http_only(http_only),
36       secure(secure),
37       session(session) {
38 }
39 
~WebCookie()40 WebCookie::~WebCookie() {
41 }
42 
43 }  // namespace webkit_glue
44