| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 198 } |
| 199 | 199 |
| 200 void DelayedCookieMonster::DeleteSessionCookiesAsync(const DeleteCallback&) { | 200 void DelayedCookieMonster::DeleteSessionCookiesAsync(const DeleteCallback&) { |
| 201 ADD_FAILURE(); | 201 ADD_FAILURE(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void DelayedCookieMonster::FlushStore(const base::Closure& callback) { | 204 void DelayedCookieMonster::FlushStore(const base::Closure& callback) { |
| 205 ADD_FAILURE(); | 205 ADD_FAILURE(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 scoped_ptr<CookieStore::CookieChangedSubscription> | 208 std::unique_ptr<CookieStore::CookieChangedSubscription> |
| 209 DelayedCookieMonster::AddCallbackForCookie( | 209 DelayedCookieMonster::AddCallbackForCookie( |
| 210 const GURL& url, | 210 const GURL& url, |
| 211 const std::string& name, | 211 const std::string& name, |
| 212 const CookieChangedCallback& callback) { | 212 const CookieChangedCallback& callback) { |
| 213 ADD_FAILURE(); | 213 ADD_FAILURE(); |
| 214 return scoped_ptr<CookieStore::CookieChangedSubscription>(); | 214 return std::unique_ptr<CookieStore::CookieChangedSubscription>(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 bool DelayedCookieMonster::IsEphemeral() { | 217 bool DelayedCookieMonster::IsEphemeral() { |
| 218 return true; | 218 return true; |
| 219 } | 219 } |
| 220 | 220 |
| 221 // | 221 // |
| 222 // CookieURLHelper | 222 // CookieURLHelper |
| 223 // | 223 // |
| 224 CookieURLHelper::CookieURLHelper(const std::string& url_string) | 224 CookieURLHelper::CookieURLHelper(const std::string& url_string) |
| 225 : url_(url_string), | 225 : url_(url_string), |
| 226 registry_(GetRegistry(url_)), | 226 registry_(GetRegistry(url_)), |
| 227 domain_and_registry_( | 227 domain_and_registry_( |
| 228 GetDomainAndRegistry(url_, INCLUDE_PRIVATE_REGISTRIES)) {} | 228 GetDomainAndRegistry(url_, INCLUDE_PRIVATE_REGISTRIES)) {} |
| 229 | 229 |
| 230 const GURL CookieURLHelper::AppendPath(const std::string& path) const { | 230 const GURL CookieURLHelper::AppendPath(const std::string& path) const { |
| 231 return GURL(url_.spec() + path); | 231 return GURL(url_.spec() + path); |
| 232 } | 232 } |
| 233 | 233 |
| 234 std::string CookieURLHelper::Format(const std::string& format_string) const { | 234 std::string CookieURLHelper::Format(const std::string& format_string) const { |
| 235 std::string new_string = format_string; | 235 std::string new_string = format_string; |
| 236 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%D", | 236 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%D", |
| 237 domain_and_registry_); | 237 domain_and_registry_); |
| 238 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%R", registry_); | 238 base::ReplaceSubstringsAfterOffset(&new_string, 0, "%R", registry_); |
| 239 return new_string; | 239 return new_string; |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace net | 242 } // namespace net |
| OLD | NEW |