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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc

Issue 1410013008: [Sync] Remove some http-related chrome deps from SyncBackendHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc
index 1e65fcd3ae46cffadc026c22db00ece0f759988e..aef421550bcc8f12b1613daea35c4e3211233390 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc
@@ -12,8 +12,10 @@
#include "base/message_loop/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
+#include "base/time/time.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
+#include "chrome/browser/sync/profile_sync_test_util.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
@@ -32,6 +34,7 @@
#include "google/cacheinvalidation/include/types.h"
#include "google_apis/gaia/gaia_constants.h"
#include "net/url_request/test_url_fetcher_factory.h"
+#include "net/url_request/url_request_context_getter.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/engine/passive_model_worker.h"
@@ -227,6 +230,12 @@ class SyncBackendHostTest : public testing::Test {
void InitializeBackend(bool expect_success) {
EXPECT_CALL(mock_frontend_, OnBackendInitialized(_, _, _, expect_success)).
WillOnce(InvokeWithoutArgs(QuitMessageLoop));
+ SyncBackendHost::HttpPostProviderFactoryGetter
+ http_post_provider_factory_getter =
+ base::Bind(&syncer::NetworkResources::GetHttpPostProviderFactory,
+ base::Unretained(network_resources_.get()),
+ make_scoped_refptr(profile_->GetRequestContext()),
+ base::Bind(&EmptyNetworkTimeUpdate));
backend_->Initialize(
&mock_frontend_, scoped_ptr<base::Thread>(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
@@ -234,7 +243,8 @@ class SyncBackendHostTest : public testing::Test {
syncer::WeakHandle<syncer::JsEventHandler>(), GURL(std::string()),
std::string(), credentials_, true, fake_manager_factory_.Pass(),
MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()),
- base::Closure(), network_resources_.get(), saved_nigori_state_.Pass());
+ base::Closure(), http_post_provider_factory_getter,
+ saved_nigori_state_.Pass());
base::RunLoop run_loop;
BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
run_loop.QuitClosure(),
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.cc ('k') | chrome/browser/sync/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698