OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Portions of this code based on Mozilla: | 5 // Portions of this code based on Mozilla: |
6 // (netwerk/cookie/src/nsCookieService.cpp) | 6 // (netwerk/cookie/src/nsCookieService.cpp) |
7 /* ***** BEGIN LICENSE BLOCK ***** | 7 /* ***** BEGIN LICENSE BLOCK ***** |
8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
9 * | 9 * |
10 * The contents of this file are subject to the Mozilla Public License Version | 10 * The contents of this file are subject to the Mozilla Public License Version |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 398 } |
399 | 399 |
400 void BuildCookieInfoList(const CanonicalCookieVector& cookies, | 400 void BuildCookieInfoList(const CanonicalCookieVector& cookies, |
401 std::vector<CookieStore::CookieInfo>* cookie_infos) { | 401 std::vector<CookieStore::CookieInfo>* cookie_infos) { |
402 for (CanonicalCookieVector::const_iterator it = cookies.begin(); | 402 for (CanonicalCookieVector::const_iterator it = cookies.begin(); |
403 it != cookies.end(); ++it) { | 403 it != cookies.end(); ++it) { |
404 const CookieMonster::CanonicalCookie* cookie = *it; | 404 const CookieMonster::CanonicalCookie* cookie = *it; |
405 CookieStore::CookieInfo cookie_info; | 405 CookieStore::CookieInfo cookie_info; |
406 | 406 |
407 cookie_info.name = cookie->Name(); | 407 cookie_info.name = cookie->Name(); |
| 408 cookie_info.creation_date = cookie->CreationDate(); |
408 cookie_info.mac_key = cookie->MACKey(); | 409 cookie_info.mac_key = cookie->MACKey(); |
409 cookie_info.mac_algorithm = cookie->MACAlgorithm(); | 410 cookie_info.mac_algorithm = cookie->MACAlgorithm(); |
410 cookie_info.source = cookie->Source(); | |
411 | 411 |
412 cookie_infos->push_back(cookie_info); | 412 cookie_infos->push_back(cookie_info); |
413 } | 413 } |
414 } | 414 } |
415 | 415 |
416 } // namespace | 416 } // namespace |
417 | 417 |
418 // static | 418 // static |
419 bool CookieMonster::enable_file_scheme_ = false; | 419 bool CookieMonster::enable_file_scheme_ = false; |
420 | 420 |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 std::string CookieMonster::CanonicalCookie::DebugString() const { | 2173 std::string CookieMonster::CanonicalCookie::DebugString() const { |
2174 return base::StringPrintf( | 2174 return base::StringPrintf( |
2175 "name: %s value: %s domain: %s path: %s creation: %" | 2175 "name: %s value: %s domain: %s path: %s creation: %" |
2176 PRId64, | 2176 PRId64, |
2177 name_.c_str(), value_.c_str(), | 2177 name_.c_str(), value_.c_str(), |
2178 domain_.c_str(), path_.c_str(), | 2178 domain_.c_str(), path_.c_str(), |
2179 static_cast<int64>(creation_date_.ToTimeT())); | 2179 static_cast<int64>(creation_date_.ToTimeT())); |
2180 } | 2180 } |
2181 | 2181 |
2182 } // namespace | 2182 } // namespace |
OLD | NEW |