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..d67b84c9f25e7e78345d172097ade499b508991b 100644 |
--- a/sync/internal_api/public/http_bridge.h |
+++ b/sync/internal_api/public/http_bridge.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/gtest_prod_util.h" |
#include "base/memory/ref_counted.h" |
@@ -54,7 +55,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, |
+ base::Callback<void(net::URLFetcher*)> bind_to_tracker_callback); |
Nicolas Zea
2015/09/09 19:56:51
nit: pass the callback by const ref here and elsew
amohammadkhan
2015/09/09 22:21:56
Done. I put the typedef of my callback in http_pos
|
// HttpPostProvider implementation. |
void SetExtraRequestHeaders(const char* headers) override; |
@@ -180,6 +182,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. |
+ base::Callback<void(net::URLFetcher*)> bind_to_tracker_callback_; |
+ |
DISALLOW_COPY_AND_ASSIGN(HttpBridge); |
}; |
@@ -194,7 +200,9 @@ class SYNC_EXPORT HttpBridgeFactory : public HttpPostProviderFactory, |
~HttpBridgeFactory() override; |
// HttpPostProviderFactory: |
- void Init(const std::string& user_agent) override; |
+ void Init( |
+ const std::string& user_agent, |
+ base::Callback<void(net::URLFetcher*)> bind_to_tracker_callback) override; |
HttpPostProviderInterface* Create() override; |
void Destroy(HttpPostProviderInterface* http) override; |
@@ -216,6 +224,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. |
+ base::Callback<void(net::URLFetcher*)> bind_to_tracker_callback_; |
+ |
DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); |
}; |