| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 DELETE_COOKIE_DUPLICATE_IN_BACKING_STORE); | 974 DELETE_COOKIE_DUPLICATE_IN_BACKING_STORE); |
| 975 } | 975 } |
| 976 } | 976 } |
| 977 DCHECK_EQ(num_duplicates, num_duplicates_found); | 977 DCHECK_EQ(num_duplicates, num_duplicates_found); |
| 978 | 978 |
| 979 return num_duplicates; | 979 return num_duplicates; |
| 980 } | 980 } |
| 981 | 981 |
| 982 void CookieMonster::SetDefaultCookieableSchemes() { | 982 void CookieMonster::SetDefaultCookieableSchemes() { |
| 983 // Note: file must be the last scheme. | 983 // Note: file must be the last scheme. |
| 984 static const char* kDefaultCookieableSchemes[] = { "http", "https", "file" }; | 984 static const char* kDefaultCookieableSchemes[] = |
| 985 int num_schemes = enable_file_scheme_ ? 3 : 2; | 985 { "http", "https", "file" }; |
| 986 int num_schemes = enable_file_scheme_ ? 4 : 3; |
| 986 SetCookieableSchemes(kDefaultCookieableSchemes, num_schemes); | 987 SetCookieableSchemes(kDefaultCookieableSchemes, num_schemes); |
| 987 } | 988 } |
| 988 | 989 |
| 989 | 990 |
| 990 void CookieMonster::FindCookiesForHostAndDomain( | 991 void CookieMonster::FindCookiesForHostAndDomain( |
| 991 const GURL& url, | 992 const GURL& url, |
| 992 const CookieOptions& options, | 993 const CookieOptions& options, |
| 993 bool update_access_time, | 994 bool update_access_time, |
| 994 std::vector<CanonicalCookie*>* cookies) { | 995 std::vector<CanonicalCookie*>* cookies) { |
| 995 lock_.AssertAcquired(); | 996 lock_.AssertAcquired(); |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 std::string CookieMonster::CanonicalCookie::DebugString() const { | 2016 std::string CookieMonster::CanonicalCookie::DebugString() const { |
| 2016 return base::StringPrintf( | 2017 return base::StringPrintf( |
| 2017 "name: %s value: %s domain: %s path: %s creation: %" | 2018 "name: %s value: %s domain: %s path: %s creation: %" |
| 2018 PRId64, | 2019 PRId64, |
| 2019 name_.c_str(), value_.c_str(), | 2020 name_.c_str(), value_.c_str(), |
| 2020 domain_.c_str(), path_.c_str(), | 2021 domain_.c_str(), path_.c_str(), |
| 2021 static_cast<int64>(creation_date_.ToTimeT())); | 2022 static_cast<int64>(creation_date_.ToTimeT())); |
| 2022 } | 2023 } |
| 2023 | 2024 |
| 2024 } // namespace | 2025 } // namespace |
| OLD | NEW |