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

Side by Side Diff: sync/internal_api/syncapi_server_connection_manager.h

Issue 15421011: Use OAuth2 token for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 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 SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // A ServerConnectionManager subclass used by the syncapi layer. We use a 47 // A ServerConnectionManager subclass used by the syncapi layer. We use a
48 // subclass so that we can override MakePost() to generate a POST object using 48 // subclass so that we can override MakePost() to generate a POST object using
49 // an instance of the HttpPostProviderFactory class. 49 // an instance of the HttpPostProviderFactory class.
50 class SYNC_EXPORT_PRIVATE SyncAPIServerConnectionManager 50 class SYNC_EXPORT_PRIVATE SyncAPIServerConnectionManager
51 : public ServerConnectionManager { 51 : public ServerConnectionManager {
52 public: 52 public:
53 // Takes ownership of factory. 53 // Takes ownership of factory.
54 SyncAPIServerConnectionManager(const std::string& server, 54 SyncAPIServerConnectionManager(const std::string& server,
55 int port, 55 int port,
56 bool use_ssl, 56 bool use_ssl,
57 bool use_oauth2_token,
57 HttpPostProviderFactory* factory); 58 HttpPostProviderFactory* factory);
58 virtual ~SyncAPIServerConnectionManager(); 59 virtual ~SyncAPIServerConnectionManager();
59 60
60 // ServerConnectionManager overrides. 61 // ServerConnectionManager overrides.
61 virtual Connection* MakeConnection() OVERRIDE; 62 virtual Connection* MakeConnection() OVERRIDE;
62 63
63 private: 64 private:
64 FRIEND_TEST_ALL_PREFIXES(SyncAPIServerConnectionManagerTest, EarlyAbortPost); 65 FRIEND_TEST_ALL_PREFIXES(SyncAPIServerConnectionManagerTest, EarlyAbortPost);
65 FRIEND_TEST_ALL_PREFIXES(SyncAPIServerConnectionManagerTest, AbortPost); 66 FRIEND_TEST_ALL_PREFIXES(SyncAPIServerConnectionManagerTest, AbortPost);
66 67
67 // A factory creating concrete HttpPostProviders for use whenever we need to 68 // A factory creating concrete HttpPostProviders for use whenever we need to
68 // issue a POST to sync servers. 69 // issue a POST to sync servers.
69 scoped_ptr<HttpPostProviderFactory> post_provider_factory_; 70 scoped_ptr<HttpPostProviderFactory> post_provider_factory_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(SyncAPIServerConnectionManager); 72 DISALLOW_COPY_AND_ASSIGN(SyncAPIServerConnectionManager);
72 }; 73 };
73 74
74 } // namespace syncer 75 } // namespace syncer
75 76
76 #endif // SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_ 77 #endif // SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/internal_api/syncapi_server_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698