OLD | NEW |
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_test_callbacks.h" | 5 #include "net/cookies/cookie_store_test_callbacks.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 if (run_in_thread_) { | 31 if (run_in_thread_) { |
32 DCHECK(!run_in_loop_); | 32 DCHECK(!run_in_loop_); |
33 expected_loop = run_in_thread_->message_loop(); | 33 expected_loop = run_in_thread_->message_loop(); |
34 } else if (run_in_loop_) { | 34 } else if (run_in_loop_) { |
35 expected_loop = run_in_loop_; | 35 expected_loop = run_in_loop_; |
36 } | 36 } |
37 ASSERT_TRUE(expected_loop != NULL); | 37 ASSERT_TRUE(expected_loop != NULL); |
38 | 38 |
39 did_run_ = true; | 39 did_run_ = true; |
40 EXPECT_EQ(expected_loop, base::MessageLoop::current()); | 40 EXPECT_EQ(expected_loop, base::MessageLoop::current()); |
41 loop_to_quit_->task_runner()->PostTask(FROM_HERE, | 41 loop_to_quit_->task_runner()->PostTask( |
42 base::MessageLoop::QuitClosure()); | 42 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
43 } | 43 } |
44 | 44 |
45 StringResultCookieCallback::StringResultCookieCallback() {} | 45 StringResultCookieCallback::StringResultCookieCallback() {} |
46 StringResultCookieCallback::StringResultCookieCallback( | 46 StringResultCookieCallback::StringResultCookieCallback( |
47 base::Thread* run_in_thread) | 47 base::Thread* run_in_thread) |
48 : CookieCallback(run_in_thread) {} | 48 : CookieCallback(run_in_thread) {} |
49 | 49 |
50 NoResultCookieCallback::NoResultCookieCallback() {} | 50 NoResultCookieCallback::NoResultCookieCallback() {} |
51 NoResultCookieCallback::NoResultCookieCallback(base::Thread* run_in_thread) | 51 NoResultCookieCallback::NoResultCookieCallback(base::Thread* run_in_thread) |
52 : CookieCallback(run_in_thread) {} | 52 : CookieCallback(run_in_thread) {} |
53 | 53 |
54 } // namespace net | 54 } // namespace net |
OLD | NEW |