Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ios/net/cookies/cookie_store_ios_unittest.mm

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/net/cookies/cookie_store_ios.mm ('k') | net/cookies/cookie_monster.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ios/net/cookies/cookie_store_ios.mm ('k') | net/cookies/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698