Try to work around that clang/win bug in another file.
[chromium-blink-merge.git] / components / gcm_driver / gcm_activity.h
blob55c12901315e42569c920d1affd8d77d2773352e
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.
5 #ifndef COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_
8 #include <string>
9 #include <vector>
11 #include "base/time/time.h"
13 namespace gcm {
15 // Contains data that are common to all activity kinds below.
16 struct Activity {
17 Activity();
18 virtual ~Activity();
20 base::Time time;
21 std::string event; // A short description of the event.
22 std::string details; // Any additional detail about the event.
25 // Contains relevant data of a connection activity.
26 struct ConnectionActivity : Activity {
27 ConnectionActivity();
28 ~ConnectionActivity() override;
31 // Contains relevant data of a check-in activity.
32 struct CheckinActivity : Activity {
33 CheckinActivity();
34 ~CheckinActivity() override;
37 // Contains relevant data of a registration/unregistration step.
38 struct RegistrationActivity : Activity {
39 RegistrationActivity();
40 ~RegistrationActivity() override;
42 std::string app_id;
43 // For GCM, comma separated sender ids. For Instance ID, authorized entity.
44 std::string source;
47 // Contains relevant data of a message receiving event.
48 struct ReceivingActivity : Activity {
49 ReceivingActivity();
50 ~ReceivingActivity() override;
52 std::string app_id;
53 std::string from;
54 int message_byte_size;
57 // Contains relevant data of a send-message step.
58 struct SendingActivity : Activity {
59 SendingActivity();
60 ~SendingActivity() override;
62 std::string app_id;
63 std::string receiver_id;
64 std::string message_id;
67 struct RecordedActivities {
68 RecordedActivities();
69 virtual ~RecordedActivities();
71 std::vector<CheckinActivity> checkin_activities;
72 std::vector<ConnectionActivity> connection_activities;
73 std::vector<RegistrationActivity> registration_activities;
74 std::vector<ReceivingActivity> receiving_activities;
75 std::vector<SendingActivity> sending_activities;
78 } // namespace gcm
80 #endif // COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_