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

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

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: Fix compilation errors Created 4 years, 3 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
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 bool removed,
353 net::CookieStore::RemovalCause cause) {
353 DCHECK(out_cookies); 354 DCHECK(out_cookies);
354 out_cookies->push_back(cookie); 355 out_cookies->push_back(cookie);
355 if (out_removes) 356 if (out_removes)
356 out_removes->push_back(removed); 357 out_removes->push_back(removed);
357 } 358 }
358 359
359 void IgnoreBoolean(bool ignored) { 360 void IgnoreBoolean(bool ignored) {
360 } 361 }
361 362
362 void IgnoreString(const std::string& ignored) { 363 void IgnoreString(const std::string& ignored) {
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 EXPECT_EQ(2U, cookies.size()); 994 EXPECT_EQ(2U, cookies.size());
994 // this deletes the callback 995 // this deletes the callback
995 handle.reset(); 996 handle.reset();
996 SetSystemCookie(kTestCookieURL, "abc", "jkl"); 997 SetSystemCookie(kTestCookieURL, "abc", "jkl");
997 EXPECT_EQ(2U, cookies.size()); 998 EXPECT_EQ(2U, cookies.size());
998 DeleteSystemCookie(kTestCookieURL, "abc"); 999 DeleteSystemCookie(kTestCookieURL, "abc");
999 store_->UnSynchronize(); 1000 store_->UnSynchronize();
1000 } 1001 }
1001 1002
1002 } // namespace net 1003 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698