| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/sync/base/syncer_error.h" | 10 #include "components/sync/base/syncer_error.h" |
| 11 #include "components/sync/protocol/sync.pb.h" | 11 #include "components/sync/protocol/sync.pb.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 | 14 |
| 15 namespace sessions { | 15 class SyncCycle; |
| 16 class SyncSession; | |
| 17 } | |
| 18 | 16 |
| 19 // A ClearServerData operation. | 17 // A ClearServerData operation. |
| 20 // | 18 // |
| 21 // An instance of this class corresponds to a single operation and is | 19 // An instance of this class corresponds to a single operation and is |
| 22 // responsible for building a request, sending it, and interpreting the | 20 // responsible for building a request, sending it, and interpreting the |
| 23 // response. | 21 // response. |
| 24 class ClearServerData { | 22 class ClearServerData { |
| 25 public: | 23 public: |
| 26 explicit ClearServerData(const std::string& account_name); | 24 explicit ClearServerData(const std::string& account_name); |
| 27 ~ClearServerData(); | 25 ~ClearServerData(); |
| 28 | 26 |
| 29 // Sends the request, blocking until the request has completed. | 27 // Sends the request, blocking until the request has completed. |
| 30 SyncerError SendRequest(sessions::SyncSession* session); | 28 SyncerError SendRequest(SyncCycle* cycle); |
| 31 | 29 |
| 32 private: | 30 private: |
| 33 sync_pb::ClientToServerMessage request_; | 31 sync_pb::ClientToServerMessage request_; |
| 34 }; | 32 }; |
| 35 | 33 |
| 36 } // namespace syncer | 34 } // namespace syncer |
| 37 | 35 |
| 38 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ | 36 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CLEAR_SERVER_DATA_H_ |
| OLD | NEW |