OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ios/net/cookies/cookie_store_ios.h" | 5 #include "ios/net/cookies/cookie_store_ios.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 private: | 342 private: |
343 bool did_run_; | 343 bool did_run_; |
344 net::CookieList cookie_list_; | 344 net::CookieList cookie_list_; |
345 }; | 345 }; |
346 | 346 |
347 namespace { | 347 namespace { |
348 | 348 |
349 void RecordCookieChanges(std::vector<net::CanonicalCookie>* out_cookies, | 349 void RecordCookieChanges(std::vector<net::CanonicalCookie>* out_cookies, |
350 std::vector<bool>* out_removes, | 350 std::vector<bool>* out_removes, |
351 const net::CanonicalCookie& cookie, | 351 const net::CanonicalCookie& cookie, |
352 bool removed) { | 352 net::CookieStore::ChangeCause cause) { |
353 DCHECK(out_cookies); | 353 DCHECK(out_cookies); |
354 out_cookies->push_back(cookie); | 354 out_cookies->push_back(cookie); |
355 if (out_removes) | 355 if (out_removes) |
356 out_removes->push_back(removed); | 356 out_removes->push_back(net::CookieStore::ChangeCauseIsDeletion(cause)); |
357 } | 357 } |
358 | 358 |
359 void IgnoreBoolean(bool ignored) { | 359 void IgnoreBoolean(bool ignored) { |
360 } | 360 } |
361 | 361 |
362 void IgnoreString(const std::string& ignored) { | 362 void IgnoreString(const std::string& ignored) { |
363 } | 363 } |
364 | 364 |
365 } // namespace | 365 } // namespace |
366 | 366 |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 EXPECT_EQ(2U, cookies.size()); | 993 EXPECT_EQ(2U, cookies.size()); |
994 // this deletes the callback | 994 // this deletes the callback |
995 handle.reset(); | 995 handle.reset(); |
996 SetSystemCookie(kTestCookieURL, "abc", "jkl"); | 996 SetSystemCookie(kTestCookieURL, "abc", "jkl"); |
997 EXPECT_EQ(2U, cookies.size()); | 997 EXPECT_EQ(2U, cookies.size()); |
998 DeleteSystemCookie(kTestCookieURL, "abc"); | 998 DeleteSystemCookie(kTestCookieURL, "abc"); |
999 store_->UnSynchronize(); | 999 store_->UnSynchronize(); |
1000 } | 1000 } |
1001 | 1001 |
1002 } // namespace net | 1002 } // namespace net |
OLD | NEW |