| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/cookie_store.h" | 5 #include "net/base/cookie_store.h" |
| 6 | 6 |
| 7 #include "net/base/cookie_options.h" | 7 #include "net/base/cookie_options.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 bool CookieStore::SetCookie(const GURL& url, const std::string& cookie_line) { | |
| 12 return SetCookieWithOptions(url, cookie_line, CookieOptions()); | |
| 13 } | |
| 14 | |
| 15 std::string CookieStore::GetCookies(const GURL& url) { | |
| 16 return GetCookiesWithOptions(url, CookieOptions()); | |
| 17 } | |
| 18 | |
| 19 void CookieStore::GetCookiesAsync( | |
| 20 const GURL& url, const GetCookiesCallback& callback) { | |
| 21 GetCookiesWithOptionsAsync(url, CookieOptions(), callback); | |
| 22 } | |
| 23 | |
| 24 void CookieStore::SetCookiesWithOptions( | |
| 25 const GURL& url, | |
| 26 const std::vector<std::string>& cookie_lines, | |
| 27 const CookieOptions& options) { | |
| 28 for (size_t i = 0; i < cookie_lines.size(); ++i) | |
| 29 SetCookieWithOptions(url, cookie_lines[i], options); | |
| 30 } | |
| 31 | |
| 32 void CookieStore::SetCookies(const GURL& url, | |
| 33 const std::vector<std::string>& cookie_lines) { | |
| 34 SetCookiesWithOptions(url, cookie_lines, CookieOptions()); | |
| 35 } | |
| 36 | |
| 37 CookieStore::CookieStore() {} | 11 CookieStore::CookieStore() {} |
| 38 | 12 |
| 39 CookieStore::~CookieStore() {} | 13 CookieStore::~CookieStore() {} |
| 40 | 14 |
| 41 CookieStore::CookieInfo::CookieInfo() {} | 15 CookieStore::CookieInfo::CookieInfo() {} |
| 42 | 16 |
| 43 CookieStore::CookieInfo::~CookieInfo() {} | 17 CookieStore::CookieInfo::~CookieInfo() {} |
| 44 | 18 |
| 45 } // namespace net | 19 } // namespace net |
| OLD | NEW |