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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 73723006: Allow customization of HttpPostProviderFactory via ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix clang compile error Created 7 years 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc9fdd2d4e950731d98ea363842de7ad13119be8..cefba245c7c284ca1f9d9f85b23b5d1eaf6f128d 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -72,6 +72,8 @@
#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_network_resources.h"
+#include "sync/internal_api/public/network_resources.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"
@@ -182,7 +184,8 @@ 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()),
+ network_resources_(new syncer::HttpBridgeNetworkResources) {
DCHECK(profile);
// By default, dev, canary, and unbranded Chromium users will go to the
// development servers. Development servers have more features than standard
@@ -548,7 +551,8 @@ 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,
+ network_resources_.get());
}
void ProfileSyncService::CreateBackend() {
@@ -2270,3 +2274,8 @@ ProfileSyncService::GetSyncTokenStatus() const {
status.next_token_request_time = next_token_request_time_;
return status;
}
+
+void ProfileSyncService::OverrideNetworkResourcesForTest(
+ scoped_ptr<syncer::NetworkResources> network_resources) {
+ network_resources_ = network_resources.Pass();
+}
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698