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

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

Issue 73723006: Allow customization of HttpPostProviderFactory via ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
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 be49aa7bcb27a4d35909c641225057f242a87708..fe0ecae2629bd9fbdb375783bba6cbdad52c2b76 100644
--- a/sync/internal_api/public/http_bridge.h
+++ b/sync/internal_api/public/http_bridge.h
@@ -8,7 +8,6 @@
#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"
@@ -22,6 +21,7 @@
#include "sync/internal_api/public/base/cancelation_observer.h"
#include "sync/internal_api/public/http_post_provider_factory.h"
#include "sync/internal_api/public/http_post_provider_interface.h"
+#include "sync/internal_api/public/network_time_update_callback.h"
#include "url/gurl.h"
class HttpBridgeTest;
@@ -40,15 +40,6 @@ namespace syncer {
class CancelationSignal;
-// Callback for updating the network time.
-// Params:
-// const base::Time& network_time - the new network time.
-// const base::TimeDelta& resolution - how precise the reading is.
-// const base::TimeDelta& latency - the http request's latency.
-typedef base::Callback<void(const base::Time&,
- const base::TimeDelta&,
- const base::TimeDelta&)> NetworkTimeUpdateCallback;
-
// A bridge between the syncer and Chromium HTTP layers.
// Provides a way for the sync backend to use Chromium directly for HTTP
// requests rather than depending on a third party provider (e.g libcurl).
@@ -237,12 +228,13 @@ class SYNC_EXPORT HttpBridgeFactory : public HttpPostProviderFactory,
public:
HttpBridgeFactory(
net::URLRequestContextGetter* baseline_context_getter,
- const NetworkTimeUpdateCallback& network_time_update_callback,
- CancelationSignal* cancelation_signal);
+ const NetworkTimeUpdateCallback& network_time_update_callback);
virtual ~HttpBridgeFactory();
// HttpPostProviderFactory:
virtual void Init(const std::string& user_agent) OVERRIDE;
+ virtual void RegisterCancelationSignal(
+ CancelationSignal* cancelation_signal) OVERRIDE;
virtual HttpPostProviderInterface* Create() OVERRIDE;
virtual void Destroy(HttpPostProviderInterface* http) OVERRIDE;
@@ -268,7 +260,7 @@ class SYNC_EXPORT HttpBridgeFactory : public HttpPostProviderFactory,
NetworkTimeUpdateCallback network_time_update_callback_;
- CancelationSignal* const cancelation_signal_;
+ CancelationSignal* cancelation_signal_;
DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory);
};

Powered by Google App Engine
This is Rietveld 408576698