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 #include "components/gcm_driver/registration_info.h" | 5 #include "components/gcm_driver/registration_info.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
8 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
9 | 11 |
10 namespace gcm { | 12 namespace gcm { |
11 | 13 |
12 namespace { | 14 namespace { |
13 const char kInsanceIDSerializationPrefix[] = "iid-"; | 15 const char kInsanceIDSerializationPrefix[] = "iid-"; |
14 const int kInsanceIDSerializationPrefixLength = | 16 const int kInsanceIDSerializationPrefixLength = |
15 sizeof(kInsanceIDSerializationPrefix) / sizeof(char) - 1; | 17 sizeof(kInsanceIDSerializationPrefix) / sizeof(char) - 1; |
16 } // namespace | 18 } // namespace |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 246 |
245 bool ExistsGCMRegistrationInMap(const RegistrationInfoMap& map, | 247 bool ExistsGCMRegistrationInMap(const RegistrationInfoMap& map, |
246 const std::string& app_id) { | 248 const std::string& app_id) { |
247 scoped_ptr<GCMRegistrationInfo> gcm_registration(new GCMRegistrationInfo); | 249 scoped_ptr<GCMRegistrationInfo> gcm_registration(new GCMRegistrationInfo); |
248 gcm_registration->app_id = app_id; | 250 gcm_registration->app_id = app_id; |
249 return map.count( | 251 return map.count( |
250 make_linked_ptr<RegistrationInfo>(gcm_registration.release())) > 0; | 252 make_linked_ptr<RegistrationInfo>(gcm_registration.release())) > 0; |
251 } | 253 } |
252 | 254 |
253 } // namespace gcm | 255 } // namespace gcm |
OLD | NEW |