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

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

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/cookies/cookie_store_test_callbacks.h ('k') | net/cookies/cookie_store_test_helpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/cookies/cookie_store_test_callbacks.h"
6
7 #include "base/message_loop/message_loop.h"
8 #include "base/threading/thread.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace net {
12
13 CookieCallback::CookieCallback(base::Thread* run_in_thread)
14 : did_run_(false),
15 run_in_thread_(run_in_thread),
16 run_in_loop_(NULL),
17 parent_loop_(base::MessageLoop::current()),
18 loop_to_quit_(base::MessageLoop::current()) {}
19
20 CookieCallback::CookieCallback()
21 : did_run_(false),
22 run_in_thread_(NULL),
23 run_in_loop_(base::MessageLoop::current()),
24 parent_loop_(NULL),
25 loop_to_quit_(base::MessageLoop::current()) {}
26
27 void CookieCallback::CallbackEpilogue() {
28 base::MessageLoop* expected_loop = NULL;
29 if (run_in_thread_) {
30 DCHECK(!run_in_loop_);
31 expected_loop = run_in_thread_->message_loop();
32 } else if (run_in_loop_) {
33 expected_loop = run_in_loop_;
34 }
35 ASSERT_TRUE(expected_loop != NULL);
36
37 did_run_ = true;
38 EXPECT_EQ(expected_loop, base::MessageLoop::current());
39 loop_to_quit_->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
40 }
41
42 StringResultCookieCallback::StringResultCookieCallback() {}
43 StringResultCookieCallback::StringResultCookieCallback(
44 base::Thread* run_in_thread)
45 : CookieCallback(run_in_thread) {}
46
47 NoResultCookieCallback::NoResultCookieCallback() {}
48 NoResultCookieCallback::NoResultCookieCallback(base::Thread* run_in_thread)
49 : CookieCallback(run_in_thread) {}
50
51 } // namespace net
OLDNEW
« no previous file with comments | « net/cookies/cookie_store_test_callbacks.h ('k') | net/cookies/cookie_store_test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698