| 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 #include "net/cookies/cookie_monster_store_test.h" | 5 #include "net/cookies/cookie_monster_store_test.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // functions. Would be nice to export them, and re-use here. | 113 // functions. Would be nice to export them, and re-use here. |
| 114 EXPECT_FALSE(pc.HasMaxAge()); | 114 EXPECT_FALSE(pc.HasMaxAge()); |
| 115 EXPECT_TRUE(pc.HasPath()); | 115 EXPECT_TRUE(pc.HasPath()); |
| 116 base::Time cookie_expires = pc.HasExpires() | 116 base::Time cookie_expires = pc.HasExpires() |
| 117 ? cookie_util::ParseCookieTime(pc.Expires()) | 117 ? cookie_util::ParseCookieTime(pc.Expires()) |
| 118 : base::Time(); | 118 : base::Time(); |
| 119 std::string cookie_path = pc.Path(); | 119 std::string cookie_path = pc.Path(); |
| 120 | 120 |
| 121 return CanonicalCookie(GURL(), pc.Name(), pc.Value(), key, cookie_path, | 121 return CanonicalCookie(GURL(), pc.Name(), pc.Value(), key, cookie_path, |
| 122 creation_time, cookie_expires, creation_time, | 122 creation_time, cookie_expires, creation_time, |
| 123 pc.IsSecure(), pc.IsHttpOnly(), pc.IsFirstPartyOnly(), | 123 pc.IsSecure(), pc.IsHttpOnly(), pc.IsSameSite(), |
| 124 pc.Priority()); | 124 pc.Priority()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void AddCookieToList(const std::string& key, | 127 void AddCookieToList(const std::string& key, |
| 128 const std::string& cookie_line, | 128 const std::string& cookie_line, |
| 129 const base::Time& creation_time, | 129 const base::Time& creation_time, |
| 130 std::vector<CanonicalCookie*>* out_list) { | 130 std::vector<CanonicalCookie*>* out_list) { |
| 131 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie( | 131 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie( |
| 132 BuildCanonicalCookie(key, cookie_line, creation_time))); | 132 BuildCanonicalCookie(key, cookie_line, creation_time))); |
| 133 | 133 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 store->AddCookie(cc); | 234 store->AddCookie(cc); |
| 235 } | 235 } |
| 236 | 236 |
| 237 return new CookieMonster(store.get(), NULL); | 237 return new CookieMonster(store.get(), NULL); |
| 238 } | 238 } |
| 239 | 239 |
| 240 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() { | 240 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() { |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace net | 243 } // namespace net |
| OLD | NEW |