Chromium Code Reviews| Index: chrome/browser/sync/glue/sync_backend_host_core.cc |
| diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc |
| index 4634c8178ddffb403b7909aadeda6c360d15e29c..fd00017c11dbfe2858b67a47f2dfb422d8e4524e 100644 |
| --- a/chrome/browser/sync/glue/sync_backend_host_core.cc |
| +++ b/chrome/browser/sync/glue/sync_backend_host_core.cc |
| @@ -4,12 +4,15 @@ |
| #include "chrome/browser/sync/glue/sync_backend_host_core.h" |
| +#include "base/bind.h" |
| +#include "base/callback.h" |
| #include "base/files/file_util.h" |
| #include "base/location.h" |
| #include "base/metrics/histogram.h" |
| #include "base/single_thread_task_runner.h" |
| #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" |
| #include "chrome/browser/sync/glue/sync_backend_registrar.h" |
| +#include "components/data_use_measurement/core/data_use_user_data.h" |
| #include "components/invalidation/public/invalidation_util.h" |
| #include "components/invalidation/public/object_id_invalidation_map.h" |
| #include "components/sync_driver/invalidation_adapter.h" |
| @@ -36,7 +39,12 @@ static const int kSaveChangesIntervalSeconds = 10; |
| namespace syncer { |
| class InternalComponentsFactory; |
| -} // namespace syncer |
| +} |
| +// namespace syncer |
|
amohammadkhan
2015/09/09 18:49:22
I'll move the comment up in next CL upload.
|
| + |
| +namespace net { |
| +class URLFetcher; |
| +} |
| namespace { |
| @@ -49,6 +57,11 @@ enum SyncBackendInitState { |
| SYNC_BACKEND_INIT_STATE_COUNT |
| }; |
| +void BindFetcherToDataTracker(net::URLFetcher* fetcher) { |
| + data_use_measurement::DataUseUserData::AttachToFetcher( |
| + fetcher, data_use_measurement::DataUseUserData::SYNC); |
| +} |
| + |
| } // namespace |
| namespace browser_sync { |
| @@ -425,7 +438,8 @@ void SyncBackendHostCore::DoInitialize( |
| // Finish initializing the HttpBridgeFactory. We do this here because |
| // building the user agent may block on some platforms. |
| - options->http_bridge_factory->Init(options->sync_user_agent); |
| + options->http_bridge_factory->Init(options->sync_user_agent, |
| + base::Bind(&BindFetcherToDataTracker)); |
| // Blow away the partial or corrupt sync data folder before doing any more |
| // initialization, if necessary. |