- add sources.
[platform/framework/web/crosswalk.git] / src / content / common / cookie_data.cc
1 // Copyright (c) 2013 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 "content/common/cookie_data.h"
6
7 #include "net/cookies/canonical_cookie.h"
8
9 namespace content {
10
11 CookieData::CookieData()
12     : expires(0),
13       http_only(false),
14       secure(false),
15       session(false) {
16 }
17
18 CookieData::CookieData(const net::CanonicalCookie& c)
19     : name(c.Name()),
20       value(c.Value()),
21       domain(c.Domain()),
22       path(c.Path()),
23       expires(c.ExpiryDate().ToDoubleT() * 1000),
24       http_only(c.IsHttpOnly()),
25       secure(c.IsSecure()),
26       session(!c.IsPersistent()) {
27 }
28
29 CookieData::~CookieData() {
30 }
31
32 }  // namespace content