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

Side by Side Diff: sync/internal_api/http_bridge_unittest.cc

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (no code changes) Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/http_bridge.cc ('k') | sync/internal_api/js_mutation_event_observer.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 (c) 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 "base/message_loop_proxy.h" 5 #include "base/message_loop_proxy.h"
6 #include "base/synchronization/waitable_event.h" 6 #include "base/synchronization/waitable_event.h"
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #include "net/test/test_server.h" 8 #include "net/test/test_server.h"
9 #include "net/url_request/test_url_fetcher_factory.h" 9 #include "net/url_request/test_url_fetcher_factory.h"
10 #include "net/url_request/url_fetcher_delegate.h" 10 #include "net/url_request/url_fetcher_delegate.h"
11 #include "net/url_request/url_request_test_util.h" 11 #include "net/url_request/url_request_test_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 base::WaitableEvent* signal_when_released); 68 base::WaitableEvent* signal_when_released);
69 69
70 static void TestSameHttpNetworkSession(MessageLoop* main_message_loop, 70 static void TestSameHttpNetworkSession(MessageLoop* main_message_loop,
71 SyncHttpBridgeTest* test) { 71 SyncHttpBridgeTest* test) {
72 scoped_refptr<HttpBridge> http_bridge(test->BuildBridge()); 72 scoped_refptr<HttpBridge> http_bridge(test->BuildBridge());
73 EXPECT_TRUE(test->GetTestRequestContextGetter()); 73 EXPECT_TRUE(test->GetTestRequestContextGetter());
74 net::HttpNetworkSession* test_session = 74 net::HttpNetworkSession* test_session =
75 test->GetTestRequestContextGetter()->GetURLRequestContext()-> 75 test->GetTestRequestContextGetter()->GetURLRequestContext()->
76 http_transaction_factory()->GetSession(); 76 http_transaction_factory()->GetSession();
77 EXPECT_EQ(test_session, 77 EXPECT_EQ(test_session,
78 http_bridge->GetRequestContextGetter()-> 78 http_bridge->GetRequestContextGetterForTest()->
79 GetURLRequestContext()-> 79 GetURLRequestContext()->
80 http_transaction_factory()->GetSession()); 80 http_transaction_factory()->GetSession());
81 main_message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure()); 81 main_message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
82 } 82 }
83 83
84 MessageLoop* GetIOThreadLoop() { 84 MessageLoop* GetIOThreadLoop() {
85 return io_thread_.message_loop(); 85 return io_thread_.message_loop();
86 } 86 }
87 87
88 // Note this is lazy created, so don't call this before your bridge. 88 // Note this is lazy created, so don't call this before your bridge.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // succeed even though we Release()d the bridge above because the call to 397 // succeed even though we Release()d the bridge above because the call to
398 // Abort should have held a reference. 398 // Abort should have held a reference.
399 io_waiter.Signal(); 399 io_waiter.Signal();
400 400
401 // Done. 401 // Done.
402 sync_thread.Stop(); 402 sync_thread.Stop();
403 io_thread()->Stop(); 403 io_thread()->Stop();
404 } 404 }
405 405
406 } // namespace syncer 406 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/http_bridge.cc ('k') | sync/internal_api/js_mutation_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698