Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: google_apis/gcm/engine/account_info.h

Issue 443573002: [GCM] Adding status to AccountMapping structure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing status from the serialized form of account mapping per CR Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « google_apis/gcm/BUILD.gn ('k') | google_apis/gcm/engine/account_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 GOOGLE_APIS_GCM_ENGINE_ACCOUNT_INFO_H_
6 #define GOOGLE_APIS_GCM_ENGINE_ACCOUNT_INFO_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/time/time.h"
12 #include "google_apis/gcm/base/gcm_export.h"
13
14 namespace gcm {
15
16 // Stores information about Account and a last message sent with the information
17 // about that account.
18 struct GCM_EXPORT AccountInfo {
19 // Indicates whether a message, if sent, was adding or removing account
20 // mapping.
21 enum MessageType {
22 MSG_NONE, // No message has been sent.
23 MSG_ADD, // Account was mapped to device by the message.
24 MSG_REMOVE, // Account mapping to device was removed by the message.
25 };
26
27 AccountInfo();
28 ~AccountInfo();
29
30 // Serializes account info to string without |account_id|.
31 std::string SerializeAsString() const;
32 // Parses account info from store, without |account_id|.
33 bool ParseFromString(const std::string& value);
34
35 // Gaia ID of the account.
36 std::string account_id;
37 // Email address of the tracked account.
38 std::string email;
39 // Type of the last mapping message sent to GCM.
40 MessageType last_message_type;
41 // ID of the last mapping message sent to GCM.
42 std::string last_message_id;
43 // Timestamp of when the last mapping message was sent to GCM.
44 base::Time last_message_timestamp;
45 };
46
47 } // namespace gcm
48
49 #endif // GOOGLE_APIS_GCM_ENGINE_ACCOUNT_INFO_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/BUILD.gn ('k') | google_apis/gcm/engine/account_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698