| 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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 MockCookieMonsterDelegate::MockCookieMonsterDelegate() {} | 90 MockCookieMonsterDelegate::MockCookieMonsterDelegate() {} |
| 91 | 91 |
| 92 void MockCookieMonsterDelegate::OnCookieChanged( | 92 void MockCookieMonsterDelegate::OnCookieChanged( |
| 93 const CanonicalCookie& cookie, | 93 const CanonicalCookie& cookie, |
| 94 bool removed, | 94 bool removed, |
| 95 CookieMonster::Delegate::ChangeCause cause) { | 95 CookieMonster::Delegate::ChangeCause cause) { |
| 96 CookieNotification notification(cookie, removed); | 96 CookieNotification notification(cookie, removed); |
| 97 changes_.push_back(notification); | 97 changes_.push_back(notification); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void MockCookieMonsterDelegate::OnLoaded() {} |
| 101 |
| 100 MockCookieMonsterDelegate::~MockCookieMonsterDelegate() {} | 102 MockCookieMonsterDelegate::~MockCookieMonsterDelegate() {} |
| 101 | 103 |
| 102 CanonicalCookie BuildCanonicalCookie(const std::string& key, | 104 CanonicalCookie BuildCanonicalCookie(const std::string& key, |
| 103 const std::string& cookie_line, | 105 const std::string& cookie_line, |
| 104 const base::Time& creation_time) { | 106 const base::Time& creation_time) { |
| 105 | 107 |
| 106 // Parse the cookie line. | 108 // Parse the cookie line. |
| 107 ParsedCookie pc(cookie_line); | 109 ParsedCookie pc(cookie_line); |
| 108 EXPECT_TRUE(pc.IsValid()); | 110 EXPECT_TRUE(pc.IsValid()); |
| 109 | 111 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 COOKIE_PRIORITY_DEFAULT); | 220 COOKIE_PRIORITY_DEFAULT); |
| 219 store->AddCookie(cc); | 221 store->AddCookie(cc); |
| 220 } | 222 } |
| 221 | 223 |
| 222 return new CookieMonster(store.get(), NULL); | 224 return new CookieMonster(store.get(), NULL); |
| 223 } | 225 } |
| 224 | 226 |
| 225 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {} | 227 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {} |
| 226 | 228 |
| 227 } // namespace net | 229 } // namespace net |
| OLD | NEW |