OLD | NEW |
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 // 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 std::string CanonicalCookie::DebugString() const { | 388 std::string CanonicalCookie::DebugString() const { |
389 return base::StringPrintf( | 389 return base::StringPrintf( |
390 "name: %s value: %s domain: %s path: %s creation: %" | 390 "name: %s value: %s domain: %s path: %s creation: %" |
391 PRId64, | 391 PRId64, |
392 name_.c_str(), value_.c_str(), | 392 name_.c_str(), value_.c_str(), |
393 domain_.c_str(), path_.c_str(), | 393 domain_.c_str(), path_.c_str(), |
394 static_cast<int64>(creation_date_.ToTimeT())); | 394 static_cast<int64>(creation_date_.ToTimeT())); |
395 } | 395 } |
396 | 396 |
| 397 CanonicalCookie* CanonicalCookie::Duplicate() { |
| 398 CanonicalCookie* cc = new CanonicalCookie(); |
| 399 cc->source_ = source_; |
| 400 cc->name_ = name_; |
| 401 cc->value_ = value_; |
| 402 cc->domain_ = domain_; |
| 403 cc->path_ = path_; |
| 404 cc->creation_date_ = creation_date_; |
| 405 cc->expiry_date_ = expiry_date_; |
| 406 cc->last_access_date_ = last_access_date_; |
| 407 cc->secure_ = secure_; |
| 408 cc->httponly_ = httponly_; |
| 409 cc->priority_ = priority_; |
| 410 return cc; |
| 411 } |
| 412 |
397 } // namespace net | 413 } // namespace net |
OLD | NEW |