| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "components/sync/base/model_type.h" | 14 #include "components/sync/base/model_type.h" |
| 15 #include "components/sync/engine/events/protocol_event.h" | 15 #include "components/sync/engine/events/protocol_event.h" |
| 16 #include "components/sync/protocol/sync.pb.h" | 16 #include "components/sync/protocol/sync.pb.h" |
| 17 | 17 |
| 18 namespace syncer { | 18 namespace syncer { |
| 19 | 19 |
| 20 class NudgeTracker; | |
| 21 | |
| 22 // An event representing a poll request sent to the server. | 20 // An event representing a poll request sent to the server. |
| 23 class PollGetUpdatesRequestEvent : public ProtocolEvent { | 21 class PollGetUpdatesRequestEvent : public ProtocolEvent { |
| 24 public: | 22 public: |
| 25 PollGetUpdatesRequestEvent(base::Time timestamp, | 23 PollGetUpdatesRequestEvent(base::Time timestamp, |
| 26 const sync_pb::ClientToServerMessage& request); | 24 const sync_pb::ClientToServerMessage& request); |
| 27 ~PollGetUpdatesRequestEvent() override; | 25 ~PollGetUpdatesRequestEvent() override; |
| 28 | 26 |
| 29 base::Time GetTimestamp() const override; | 27 base::Time GetTimestamp() const override; |
| 30 std::string GetType() const override; | 28 std::string GetType() const override; |
| 31 std::string GetDetails() const override; | 29 std::string GetDetails() const override; |
| 32 std::unique_ptr<base::DictionaryValue> GetProtoMessage() const override; | 30 std::unique_ptr<base::DictionaryValue> GetProtoMessage() const override; |
| 33 std::unique_ptr<ProtocolEvent> Clone() const override; | 31 std::unique_ptr<ProtocolEvent> Clone() const override; |
| 34 | 32 |
| 35 private: | 33 private: |
| 36 const base::Time timestamp_; | 34 const base::Time timestamp_; |
| 37 const sync_pb::ClientToServerMessage request_; | 35 const sync_pb::ClientToServerMessage request_; |
| 38 | 36 |
| 39 DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesRequestEvent); | 37 DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesRequestEvent); |
| 40 }; | 38 }; |
| 41 | 39 |
| 42 } // namespace syncer | 40 } // namespace syncer |
| 43 | 41 |
| 44 #endif // COMPONENTS_SYNC_ENGINE_IMPL_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ | 42 #endif // COMPONENTS_SYNC_ENGINE_IMPL_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ |
| OLD | NEW |