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

Side by Side Diff: net/cookies/cookie_monster_unittest.cc

Issue 1398973003: Don't use base::MessageLoop::{Quit,QuitClosure} in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
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_unittest.h" 5 #include "net/cookies/cookie_store_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 const std::string path; 630 const std::string path;
631 const base::Time expiration_time; 631 const base::Time expiration_time;
632 bool secure; 632 bool secure;
633 bool http_only; 633 bool http_only;
634 bool first_party_only; 634 bool first_party_only;
635 CookiePriority priority; 635 CookiePriority priority;
636 }; 636 };
637 637
638 ACTION(QuitCurrentMessageLoop) { 638 ACTION(QuitCurrentMessageLoop) {
639 base::ThreadTaskRunnerHandle::Get()->PostTask( 639 base::ThreadTaskRunnerHandle::Get()->PostTask(
640 FROM_HERE, base::MessageLoop::QuitClosure()); 640 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
641 } 641 }
642 642
643 // TODO(erikwright): When the synchronous helpers 'GetCookies' etc. are removed, 643 // TODO(erikwright): When the synchronous helpers 'GetCookies' etc. are removed,
644 // rename these, removing the 'Action' suffix. 644 // rename these, removing the 'Action' suffix.
645 ACTION_P4(DeleteCookieAction, cookie_monster, url, name, callback) { 645 ACTION_P4(DeleteCookieAction, cookie_monster, url, name, callback) {
646 cookie_monster->DeleteCookieAsync(url, name, callback->AsCallback()); 646 cookie_monster->DeleteCookieAsync(url, name, callback->AsCallback());
647 } 647 }
648 ACTION_P3(GetCookiesAction, cookie_monster, url, callback) { 648 ACTION_P3(GetCookiesAction, cookie_monster, url, callback) {
649 cookie_monster->GetCookiesWithOptionsAsync(url, CookieOptions(), 649 cookie_monster->GetCookiesWithOptionsAsync(url, CookieOptions(),
650 callback->AsCallback()); 650 callback->AsCallback());
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 monster()->AddCallbackForCookie( 3051 monster()->AddCallbackForCookie(
3052 test_url_, "abc", 3052 test_url_, "abc",
3053 base::Bind(&RecordCookieChanges, &cookies1, nullptr))); 3053 base::Bind(&RecordCookieChanges, &cookies1, nullptr)));
3054 SetCookie(monster(), test_url_, "abc=def"); 3054 SetCookie(monster(), test_url_, "abc=def");
3055 base::MessageLoop::current()->RunUntilIdle(); 3055 base::MessageLoop::current()->RunUntilIdle();
3056 EXPECT_EQ(1U, cookies0.size()); 3056 EXPECT_EQ(1U, cookies0.size());
3057 EXPECT_EQ(1U, cookies0.size()); 3057 EXPECT_EQ(1U, cookies0.size());
3058 } 3058 }
3059 3059
3060 } // namespace net 3060 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_win_unittest.cc ('k') | net/cookies/cookie_store_test_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698