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

Side by Side Diff: trunk/src/sync/internal_api/syncapi_server_connection_manager.cc

Issue 23658030: Revert 222154 "sync: Gracefully handle very early shutdown" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "sync/internal_api/syncapi_server_connection_manager.h" 5 #include "sync/internal_api/syncapi_server_connection_manager.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/http/http_status_code.h" 8 #include "net/http/http_status_code.h"
9 #include "sync/internal_api/public/http_post_provider_factory.h" 9 #include "sync/internal_api/public/http_post_provider_factory.h"
10 #include "sync/internal_api/public/http_post_provider_interface.h" 10 #include "sync/internal_api/public/http_post_provider_interface.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void SyncAPIBridgedConnection::Abort() { 85 void SyncAPIBridgedConnection::Abort() {
86 DCHECK(post_provider_); 86 DCHECK(post_provider_);
87 post_provider_->Abort(); 87 post_provider_->Abort();
88 } 88 }
89 89
90 SyncAPIServerConnectionManager::SyncAPIServerConnectionManager( 90 SyncAPIServerConnectionManager::SyncAPIServerConnectionManager(
91 const std::string& server, 91 const std::string& server,
92 int port, 92 int port,
93 bool use_ssl, 93 bool use_ssl,
94 bool use_oauth2_token, 94 bool use_oauth2_token,
95 HttpPostProviderFactory* factory, 95 HttpPostProviderFactory* factory)
96 CancelationSignal* cancelation_signal) 96 : ServerConnectionManager(server, port, use_ssl, use_oauth2_token),
97 : ServerConnectionManager(server,
98 port,
99 use_ssl,
100 use_oauth2_token,
101 cancelation_signal),
102 post_provider_factory_(factory) { 97 post_provider_factory_(factory) {
103 DCHECK(post_provider_factory_.get()); 98 DCHECK(post_provider_factory_.get());
104 } 99 }
105 100
106 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} 101 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {}
107 102
108 scoped_ptr<ServerConnectionManager::Connection> 103 ServerConnectionManager::Connection*
109 SyncAPIServerConnectionManager::MakeConnection() { 104 SyncAPIServerConnectionManager::MakeConnection() {
110 return scoped_ptr<Connection>( 105 return new SyncAPIBridgedConnection(this, post_provider_factory_.get());
111 new SyncAPIBridgedConnection(this, post_provider_factory_.get()));
112 } 106 }
113 107
114 } // namespace syncer 108 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698