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

Side by Side Diff: components/sync/core/http_post_provider_interface.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 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
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 COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_ 5 #ifndef COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_
6 #define COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_ 6 #define COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/sync/base/sync_export.h"
11
12 namespace syncer { 10 namespace syncer {
13 11
14 // An interface the embedding application (e.g. Chromium) implements to provide 12 // An interface the embedding application (e.g. Chromium) implements to provide
15 // required HTTP POST functionality to the syncer backend. This interface is 13 // required HTTP POST functionality to the syncer backend. This interface is
16 // designed for one-time use. You create one, use it, and create another if you 14 // designed for one-time use. You create one, use it, and create another if you
17 // want to make a subsequent POST. 15 // want to make a subsequent POST.
18 class SYNC_EXPORT HttpPostProviderInterface { 16 class HttpPostProviderInterface {
19 public: 17 public:
20 // Add additional headers to the request. 18 // Add additional headers to the request.
21 virtual void SetExtraRequestHeaders(const char* headers) = 0; 19 virtual void SetExtraRequestHeaders(const char* headers) = 0;
22 20
23 // Set the URL to POST to. 21 // Set the URL to POST to.
24 virtual void SetURL(const char* url, int port) = 0; 22 virtual void SetURL(const char* url, int port) = 0;
25 23
26 // Set the type, length and content of the POST payload. 24 // Set the type, length and content of the POST payload.
27 // |content_type| is a null-terminated MIME type specifier. 25 // |content_type| is a null-terminated MIME type specifier.
28 // |content| is a data buffer; Do not interpret as a null-terminated string. 26 // |content| is a data buffer; Do not interpret as a null-terminated string.
(...skipping 26 matching lines...) Expand all
55 // This must be safe to call from any thread. 53 // This must be safe to call from any thread.
56 virtual void Abort() = 0; 54 virtual void Abort() = 0;
57 55
58 protected: 56 protected:
59 virtual ~HttpPostProviderInterface() {} 57 virtual ~HttpPostProviderInterface() {}
60 }; 58 };
61 59
62 } // namespace syncer 60 } // namespace syncer
63 61
64 #endif // COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_ 62 #endif // COMPONENTS_SYNC_CORE_HTTP_POST_PROVIDER_INTERFACE_H_
OLDNEW
« no previous file with comments | « components/sync/core/http_post_provider_factory.h ('k') | components/sync/core/internal_components_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698