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_GCM_DRIVER_REGISTRATION_INFO_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_ |
6 #define COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_ | 6 #define COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | |
13 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
15 | 14 |
16 namespace gcm { | 15 namespace gcm { |
17 | 16 |
18 // Encapsulates the information needed to register with the server. | 17 // Encapsulates the information needed to register with the server. |
19 struct RegistrationInfo { | 18 struct RegistrationInfo { |
20 enum RegistrationType { | 19 enum RegistrationType { |
21 GCM_REGISTRATION, | 20 GCM_REGISTRATION, |
22 INSTANCE_ID_TOKEN | 21 INSTANCE_ID_TOKEN |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::string, | 120 std::string, |
122 RegistrationInfoComparer> RegistrationInfoMap; | 121 RegistrationInfoComparer> RegistrationInfoMap; |
123 | 122 |
124 // Returns true if a GCM registration for |app_id| exists in |map|. | 123 // Returns true if a GCM registration for |app_id| exists in |map|. |
125 bool ExistsGCMRegistrationInMap(const RegistrationInfoMap& map, | 124 bool ExistsGCMRegistrationInMap(const RegistrationInfoMap& map, |
126 const std::string& app_id); | 125 const std::string& app_id); |
127 | 126 |
128 } // namespace gcm | 127 } // namespace gcm |
129 | 128 |
130 #endif // COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_ | 129 #endif // COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_ |
OLD | NEW |