OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/sync/engine/net/syncapi_server_connection_manager.h" | 5 #include "chrome/browser/sync/engine/net/syncapi_server_connection_manager.h" |
6 | 6 |
7 #include "chrome/browser/sync/engine/net/http_return.h" | 7 #include "chrome/browser/sync/engine/net/http_return.h" |
8 #include "chrome/browser/sync/engine/syncapi.h" | 8 #include "chrome/browser/sync/engine/syncapi.h" |
9 | 9 |
10 using browser_sync::HttpResponse; | 10 using browser_sync::HttpResponse; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 response->server_status = HttpResponse::SYNC_SERVER_ERROR; | 56 response->server_status = HttpResponse::SYNC_SERVER_ERROR; |
57 | 57 |
58 // Write the content into our buffer. | 58 // Write the content into our buffer. |
59 buffer_.assign(http->GetResponseContent(), http->GetResponseContentLength()); | 59 buffer_.assign(http->GetResponseContent(), http->GetResponseContentLength()); |
60 | 60 |
61 // We're done with the HttpPostProvider. | 61 // We're done with the HttpPostProvider. |
62 factory_->Destroy(http); | 62 factory_->Destroy(http); |
63 return true; | 63 return true; |
64 } | 64 } |
65 | 65 |
66 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() { | 66 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} |
tim (not reviewing)
2010/01/26 20:08:45
may as well throw this in .h
| |
67 delete post_provider_factory_; | |
68 } | |
69 | |
70 void SyncAPIServerConnectionManager::SetHttpPostProviderFactory( | |
71 HttpPostProviderFactory* factory) { | |
72 if (post_provider_factory_) | |
73 delete post_provider_factory_; | |
74 post_provider_factory_ = factory; | |
75 } | |
76 | 67 |
77 } // namespace sync_api | 68 } // namespace sync_api |
OLD | NEW |