| 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_store_test_helpers.h" | 5 #include "net/cookies/cookie_store_test_helpers.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/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 registry_length); | 27 registry_length); |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 namespace net { | 32 namespace net { |
| 33 | 33 |
| 34 const int kDelayedTime = 0; | 34 const int kDelayedTime = 0; |
| 35 | 35 |
| 36 DelayedCookieMonster::DelayedCookieMonster() | 36 DelayedCookieMonster::DelayedCookieMonster() |
| 37 : cookie_monster_(new CookieMonster(NULL, NULL)), | 37 : cookie_monster_(new CookieMonster(nullptr, nullptr)), |
| 38 did_run_(false), | 38 did_run_(false), |
| 39 result_(false) { | 39 result_(false) {} |
| 40 } | |
| 41 | 40 |
| 42 DelayedCookieMonster::~DelayedCookieMonster() { | 41 DelayedCookieMonster::~DelayedCookieMonster() { |
| 43 } | 42 } |
| 44 | 43 |
| 45 void DelayedCookieMonster::SetCookiesInternalCallback(bool result) { | 44 void DelayedCookieMonster::SetCookiesInternalCallback(bool result) { |
| 46 result_ = result; | 45 result_ = result; |
| 47 did_run_ = true; | 46 did_run_ = true; |
| 48 } | 47 } |
| 49 | 48 |
| 50 void DelayedCookieMonster::GetCookiesWithOptionsInternalCallback( | 49 void DelayedCookieMonster::GetCookiesWithOptionsInternalCallback( |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 229 |
| 231 std::string CookieURLHelper::Format(const std::string& format_string) const { | 230 std::string CookieURLHelper::Format(const std::string& format_string) const { |
| 232 std::string new_string = format_string; | 231 std::string new_string = format_string; |
| 233 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%D", | 232 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%D", |
| 234 domain_and_registry_); | 233 domain_and_registry_); |
| 235 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%R", registry_); | 234 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%R", registry_); |
| 236 return new_string; | 235 return new_string; |
| 237 } | 236 } |
| 238 | 237 |
| 239 } // namespace net | 238 } // namespace net |
| OLD | NEW |