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

Unified Diff: sync/internal_api/public/http_bridge.h

Issue 1330443002: Report data usage UMA for Chrome services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Fix calling Init function in sync_client.cc Created 5 years, 3 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
« no previous file with comments | « sync/internal_api/http_bridge_unittest.cc ('k') | sync/internal_api/public/http_post_provider_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/http_bridge.h
diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h
index 36704e2a1bd5040db54b1f3a9f551d717c671758..73e68a520741abcf41e22ce6952924f6abdcbaac 100644
--- a/sync/internal_api/public/http_bridge.h
+++ b/sync/internal_api/public/http_bridge.h
@@ -54,7 +54,8 @@ class SYNC_EXPORT_PRIVATE HttpBridge
public:
HttpBridge(const std::string& user_agent,
const scoped_refptr<net::URLRequestContextGetter>& context,
- const NetworkTimeUpdateCallback& network_time_update_callback);
+ const NetworkTimeUpdateCallback& network_time_update_callback,
+ const BindToTrackerCallback& bind_to_tracker_callback);
// HttpPostProvider implementation.
void SetExtraRequestHeaders(const char* headers) override;
@@ -180,6 +181,10 @@ class SYNC_EXPORT_PRIVATE HttpBridge
// Callback for updating network time.
NetworkTimeUpdateCallback network_time_update_callback_;
+ // A callback to tag Sync request to be able to record data use of this
+ // service by data_use_measurement component.
+ BindToTrackerCallback bind_to_tracker_callback_;
+
DISALLOW_COPY_AND_ASSIGN(HttpBridge);
};
@@ -194,7 +199,8 @@ class SYNC_EXPORT HttpBridgeFactory : public HttpPostProviderFactory,
~HttpBridgeFactory() override;
// HttpPostProviderFactory:
- void Init(const std::string& user_agent) override;
+ void Init(const std::string& user_agent,
+ const BindToTrackerCallback& bind_to_tracker_callback) override;
HttpPostProviderInterface* Create() override;
void Destroy(HttpPostProviderInterface* http) override;
@@ -216,6 +222,10 @@ class SYNC_EXPORT HttpBridgeFactory : public HttpPostProviderFactory,
CancelationSignal* const cancelation_signal_;
+ // A callback to tag Sync request to be able to record data use of this
+ // service by data_use_measurement component.
+ BindToTrackerCallback bind_to_tracker_callback_;
+
DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory);
};
« no previous file with comments | « sync/internal_api/http_bridge_unittest.cc ('k') | sync/internal_api/public/http_post_provider_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698