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 | |
102 MockCookieMonsterDelegate::~MockCookieMonsterDelegate() {} | 100 MockCookieMonsterDelegate::~MockCookieMonsterDelegate() {} |
103 | 101 |
104 CanonicalCookie BuildCanonicalCookie(const std::string& key, | 102 CanonicalCookie BuildCanonicalCookie(const std::string& key, |
105 const std::string& cookie_line, | 103 const std::string& cookie_line, |
106 const base::Time& creation_time) { | 104 const base::Time& creation_time) { |
107 | 105 |
108 // Parse the cookie line. | 106 // Parse the cookie line. |
109 ParsedCookie pc(cookie_line); | 107 ParsedCookie pc(cookie_line); |
110 EXPECT_TRUE(pc.IsValid()); | 108 EXPECT_TRUE(pc.IsValid()); |
111 | 109 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 COOKIE_PRIORITY_DEFAULT); | 218 COOKIE_PRIORITY_DEFAULT); |
221 store->AddCookie(cc); | 219 store->AddCookie(cc); |
222 } | 220 } |
223 | 221 |
224 return new CookieMonster(store.get(), NULL); | 222 return new CookieMonster(store.get(), NULL); |
225 } | 223 } |
226 | 224 |
227 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {} | 225 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {} |
228 | 226 |
229 } // namespace net | 227 } // namespace net |
OLD | NEW |