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

Side by Side Diff: sync/internal_api/public/http_post_provider_factory.h

Issue 1339943003: Revert "Report data usage UMA for Chrome services" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sync/internal_api/public/http_bridge.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_
6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h"
11 #include "sync/base/sync_export.h" 10 #include "sync/base/sync_export.h"
12 11
13 namespace net {
14 class URLFetcher;
15 }
16
17 namespace syncer { 12 namespace syncer {
18 13
19 typedef base::Callback<void(net::URLFetcher*)> BindToTrackerCallback;
20
21 class HttpPostProviderInterface; 14 class HttpPostProviderInterface;
22 15
23 // A factory to create HttpPostProviders to hide details about the 16 // A factory to create HttpPostProviders to hide details about the
24 // implementations and dependencies. 17 // implementations and dependencies.
25 // A factory instance itself should be owned by whomever uses it to create 18 // A factory instance itself should be owned by whomever uses it to create
26 // HttpPostProviders. 19 // HttpPostProviders.
27 class SYNC_EXPORT HttpPostProviderFactory { 20 class SYNC_EXPORT HttpPostProviderFactory {
28 public: 21 public:
29 virtual ~HttpPostProviderFactory() {} 22 virtual ~HttpPostProviderFactory() {}
30 23
31 virtual void Init(const std::string& user_agent, 24 virtual void Init(const std::string& user_agent) = 0;
32 const BindToTrackerCallback& bind_to_tracker_callback) = 0;
33 25
34 // Obtain a new HttpPostProviderInterface instance, owned by caller. 26 // Obtain a new HttpPostProviderInterface instance, owned by caller.
35 virtual HttpPostProviderInterface* Create() = 0; 27 virtual HttpPostProviderInterface* Create() = 0;
36 28
37 // When the interface is no longer needed (ready to be cleaned up), clients 29 // When the interface is no longer needed (ready to be cleaned up), clients
38 // must call Destroy(). 30 // must call Destroy().
39 // This allows actual HttpPostProvider subclass implementations to be 31 // This allows actual HttpPostProvider subclass implementations to be
40 // reference counted, which is useful if a particular implementation uses 32 // reference counted, which is useful if a particular implementation uses
41 // multiple threads to serve network requests. 33 // multiple threads to serve network requests.
42 virtual void Destroy(HttpPostProviderInterface* http) = 0; 34 virtual void Destroy(HttpPostProviderInterface* http) = 0;
43 }; 35 };
44 36
45 } // namespace syncer 37 } // namespace syncer
46 38
47 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_ 39 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/http_bridge.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698