OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_SYNC_ENGINE_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ | |
6 #define COMPONENTS_SYNC_ENGINE_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 #include "base/time/time.h" | |
13 #include "base/values.h" | |
14 #include "components/sync/base/model_type.h" | |
15 #include "components/sync/engine/events/protocol_event.h" | |
16 #include "components/sync/protocol/sync.pb.h" | |
17 | |
18 namespace syncer { | |
19 | |
20 class NudgeTracker; | |
21 | |
22 // An event representing a 'normal mode' GetUpdate request to the server. | |
23 class NormalGetUpdatesRequestEvent : public ProtocolEvent { | |
24 public: | |
25 NormalGetUpdatesRequestEvent(base::Time timestamp, | |
26 const NudgeTracker& nudge_tracker, | |
27 const sync_pb::ClientToServerMessage& request); | |
28 | |
29 ~NormalGetUpdatesRequestEvent() override; | |
30 | |
31 base::Time GetTimestamp() const override; | |
32 std::string GetType() const override; | |
33 std::string GetDetails() const override; | |
34 std::unique_ptr<base::DictionaryValue> GetProtoMessage() const override; | |
35 std::unique_ptr<ProtocolEvent> Clone() const override; | |
36 | |
37 private: | |
38 NormalGetUpdatesRequestEvent(base::Time timestamp, | |
39 ModelTypeSet nudged_types, | |
40 ModelTypeSet notified_types, | |
41 ModelTypeSet refresh_requested_types, | |
42 bool is_retry, | |
43 sync_pb::ClientToServerMessage request); | |
44 | |
45 const base::Time timestamp_; | |
46 | |
47 const ModelTypeSet nudged_types_; | |
48 const ModelTypeSet notified_types_; | |
49 const ModelTypeSet refresh_requested_types_; | |
50 const bool is_retry_; | |
51 | |
52 const sync_pb::ClientToServerMessage request_; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesRequestEvent); | |
55 }; | |
56 | |
57 } // namespace syncer | |
58 | |
59 #endif // COMPONENTS_SYNC_ENGINE_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ | |
OLD | NEW |