summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/glue/http_bridge_unittest.cc14
-rw-r--r--chrome/browser/sync/glue/sync_backend_host_unittest.cc2
-rw-r--r--chrome/browser/sync/notifier/DEPS2
-rw-r--r--chrome/browser/sync/notifier/invalidation_notifier_unittest.cc5
-rw-r--r--chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc6
-rw-r--r--chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc6
-rw-r--r--chrome/browser/sync/tools/sync_listen_notifications.cc5
-rw-r--r--chrome/browser/sync/tools/sync_tools.gyp1
8 files changed, 24 insertions, 17 deletions
diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc
index 1fd9092..5329819 100644
--- a/chrome/browser/sync/glue/http_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/http_bridge_unittest.cc
@@ -5,7 +5,6 @@
#include "base/message_loop_proxy.h"
#include "base/threading/thread.h"
#include "chrome/browser/sync/glue/http_bridge.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "net/test/test_server.h"
@@ -45,7 +44,9 @@ class SyncHttpBridgeTest : public testing::Test {
HttpBridge* BuildBridge() {
if (!fake_default_request_context_getter_) {
- fake_default_request_context_getter_ = new TestURLRequestContextGetter();
+ fake_default_request_context_getter_ =
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
fake_default_request_context_getter_->AddRef();
}
HttpBridge* bridge = new HttpBridge(
@@ -148,7 +149,8 @@ TEST_F(SyncHttpBridgeTest, TestUsesSameHttpNetworkSession) {
// Test the HttpBridge without actually making any network requests.
TEST_F(SyncHttpBridgeTest, TestMakeSynchronousPostShunted) {
scoped_refptr<net::URLRequestContextGetter> ctx_getter(
- new TestURLRequestContextGetter());
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
scoped_refptr<HttpBridge> http_bridge(new ShuntedHttpBridge(
ctx_getter, this, false));
http_bridge->SetUserAgent("bob");
@@ -272,7 +274,8 @@ TEST_F(SyncHttpBridgeTest, TestResponseHeader) {
TEST_F(SyncHttpBridgeTest, Abort) {
scoped_refptr<net::URLRequestContextGetter> ctx_getter(
- new TestURLRequestContextGetter());
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
scoped_refptr<ShuntedHttpBridge> http_bridge(new ShuntedHttpBridge(
ctx_getter, this, true));
http_bridge->SetUserAgent("bob");
@@ -291,7 +294,8 @@ TEST_F(SyncHttpBridgeTest, Abort) {
TEST_F(SyncHttpBridgeTest, AbortLate) {
scoped_refptr<net::URLRequestContextGetter> ctx_getter(
- new TestURLRequestContextGetter());
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
scoped_refptr<ShuntedHttpBridge> http_bridge(new ShuntedHttpBridge(
ctx_getter, this, false));
http_bridge->SetUserAgent("bob");
diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
index 2a700ec..04e1807 100644
--- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
@@ -14,9 +14,7 @@
#include "chrome/browser/sync/protocol/sync_protocol_error.h"
#include "chrome/browser/sync/sync_prefs.h"
#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "chrome/test/base/testing_profile.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/sync/notifier/DEPS b/chrome/browser/sync/notifier/DEPS
index 19b4f38..7376cba 100644
--- a/chrome/browser/sync/notifier/DEPS
+++ b/chrome/browser/sync/notifier/DEPS
@@ -1,8 +1,6 @@
include_rules = [
"-chrome",
- "+chrome/test/base",
-
"+chrome/browser/sync/notifier",
"+chrome/browser/sync/syncable/model_type.h",
"+chrome/browser/sync/syncable/model_type_payload_map.h",
diff --git a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
index 93b123a..64f206c 100644
--- a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
+++ b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
@@ -11,12 +11,12 @@
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "chrome/browser/sync/util/weak_handle.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_browser_thread.h"
#include "jingle/notifier/base/fake_base_task.h"
#include "jingle/notifier/base/notifier_options.h"
#include "net/base/cert_verifier.h"
#include "net/base/host_resolver.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -37,7 +37,8 @@ class InvalidationNotifierTest : public testing::Test {
notifier::NotifierOptions notifier_options;
// Note: URLRequestContextGetters are ref-counted.
notifier_options.request_context_getter =
- new TestURLRequestContextGetter();
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
invalidation_notifier_.reset(
new InvalidationNotifier(
notifier_options,
diff --git a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index c293bdb..a3b8f64 100644
--- a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "chrome/browser/sync/util/weak_handle.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_browser_thread.h"
#include "jingle/notifier/base/fake_base_task.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -37,7 +37,9 @@ class NonBlockingInvalidationNotifierTest : public testing::Test {
base::Thread::Options options;
options.message_loop_type = MessageLoop::TYPE_IO;
io_thread_.StartIOThread();
- request_context_getter_ = new TestURLRequestContextGetter;
+ request_context_getter_ =
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
notifier::NotifierOptions notifier_options;
notifier_options.request_context_getter = request_context_getter_;
invalidation_notifier_.reset(
diff --git a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
index 70783a5..89bf8eb 100644
--- a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
@@ -17,8 +17,8 @@
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_browser_thread.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,7 +39,9 @@ class SyncNotifierFactoryTest : public testing::Test {
virtual ~SyncNotifierFactoryTest() {}
virtual void SetUp() OVERRIDE {
- request_context_getter_ = new TestURLRequestContextGetter;
+ request_context_getter_ =
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
factory_.reset(new SyncNotifierFactory(
"fake_client_info",
request_context_getter_,
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc
index c5836ab..76f8bce 100644
--- a/chrome/browser/sync/tools/sync_listen_notifications.cc
+++ b/chrome/browser/sync/tools/sync_listen_notifications.cc
@@ -21,9 +21,9 @@
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/public/browser/browser_thread.h"
#include "content/test/test_browser_thread.h"
+#include "net/url_request/url_request_test_util.h"
using content::BrowserThread;
@@ -125,7 +125,8 @@ int main(int argc, char* argv[]) {
const char kClientInfo[] = "sync_listen_notifications";
scoped_refptr<TestURLRequestContextGetter> request_context_getter(
- new TestURLRequestContextGetter());
+ new TestURLRequestContextGetter(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
NullInvalidationVersionTracker null_invalidation_version_tracker;
sync_notifier::SyncNotifierFactory sync_notifier_factory(
kClientInfo, request_context_getter,
diff --git a/chrome/browser/sync/tools/sync_tools.gyp b/chrome/browser/sync/tools/sync_tools.gyp
index 226ae62..fddbd34 100644
--- a/chrome/browser/sync/tools/sync_tools.gyp
+++ b/chrome/browser/sync/tools/sync_tools.gyp
@@ -16,6 +16,7 @@
'<(DEPTH)/chrome/chrome.gyp:test_support_common',
'<(DEPTH)/content/content.gyp:content_browser',
'<(DEPTH)/net/net.gyp:net',
+ '<(DEPTH)/net/net.gyp:net_test_support',
],
},
],