| Index: chrome/browser/sync/profile_sync_service.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
|
| index 5173ed7c0d765c02a5209aa955e2c9a8cf9a43cc..31485107a6ea03bfaa475a129bf9a3e35c2c4720 100644
|
| --- a/chrome/browser/sync/profile_sync_service.cc
|
| +++ b/chrome/browser/sync/profile_sync_service.cc
|
| @@ -26,6 +26,7 @@
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/defaults.h"
|
| #include "chrome/browser/net/chrome_cookie_notification_details.h"
|
| +#include "chrome/browser/network_time/network_time_tracker.h"
|
| #include "chrome/browser/prefs/pref_service_syncable.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/signin/about_signin_internals.h"
|
| @@ -70,6 +71,9 @@
|
| #include "net/url_request/url_request_context_getter.h"
|
| #include "sync/api/sync_error.h"
|
| #include "sync/internal_api/public/configure_reason.h"
|
| +#include "sync/internal_api/public/http_bridge_factory_factory.h"
|
| +#include "sync/internal_api/public/http_post_provider_factory.h"
|
| +#include "sync/internal_api/public/http_post_provider_factory_factory.h"
|
| #include "sync/internal_api/public/sync_encryption_handler.h"
|
| #include "sync/internal_api/public/util/experiments.h"
|
| #include "sync/internal_api/public/util/sync_string_conversions.h"
|
| @@ -179,7 +183,9 @@ ProfileSyncService::ProfileSyncService(
|
| request_access_token_backoff_(&kRequestAccessTokenBackoffPolicy),
|
| weak_factory_(this),
|
| connection_status_(syncer::CONNECTION_NOT_ATTEMPTED),
|
| - last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()) {
|
| + last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()),
|
| + http_post_provider_factory_factory_(
|
| + new syncer::HttpBridgeFactoryFactory) {
|
| DCHECK(profile);
|
| // By default, dev, canary, and unbranded Chromium users will go to the
|
| // development servers. Development servers have more features than standard
|
| @@ -541,7 +547,10 @@ void ProfileSyncService::InitializeBackend(bool delete_stale_data) {
|
| scoped_ptr<syncer::SyncManagerFactory>(
|
| new syncer::SyncManagerFactory).Pass(),
|
| backend_unrecoverable_error_handler.Pass(),
|
| - &browser_sync::ChromeReportUnrecoverableError);
|
| + &browser_sync::ChromeReportUnrecoverableError,
|
| + make_scoped_ptr(http_post_provider_factory_factory_->Create(
|
| + make_scoped_refptr(profile_->GetRequestContext()),
|
| + NetworkTimeTracker::BuildNotifierUpdateCallback())));
|
| }
|
|
|
| void ProfileSyncService::CreateBackend() {
|
| @@ -2259,3 +2268,9 @@ ProfileSyncService::GetSyncTokenStatus() const {
|
| status.next_token_request_time = next_token_request_time_;
|
| return status;
|
| }
|
| +
|
| +void ProfileSyncService::OverrideHttpPostProviderFactoryFactoryForTest(
|
| + syncer::HttpPostProviderFactoryFactory*
|
| + http_post_provider_factory_factory) {
|
| + http_post_provider_factory_factory_ = http_post_provider_factory_factory;
|
| +}
|
|
|