| 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/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/pref_service.h" | |
| 9 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 10 #include "components/gcm_driver/gcm_driver.h" | 9 #include "components/gcm_driver/gcm_driver.h" |
| 10 #include "components/prefs/pref_service.h" |
| 11 #include "components/proximity_auth/cryptauth/pref_names.h" | 11 #include "components/proximity_auth/cryptauth/pref_names.h" |
| 12 #include "components/proximity_auth/logging/logging.h" | 12 #include "components/proximity_auth/logging/logging.h" |
| 13 | 13 |
| 14 namespace proximity_auth { | 14 namespace proximity_auth { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // The GCM app id identifies the client. | 18 // The GCM app id identifies the client. |
| 19 const char kCryptAuthGCMAppId[] = "com.google.chrome.cryptauth"; | 19 const char kCryptAuthGCMAppId[] = "com.google.chrome.cryptauth"; |
| 20 | 20 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return; | 137 return; |
| 138 } | 138 } |
| 139 | 139 |
| 140 PA_LOG(INFO) << "GCM registration success, registration_id=" | 140 PA_LOG(INFO) << "GCM registration success, registration_id=" |
| 141 << registration_id; | 141 << registration_id; |
| 142 pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id); | 142 pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id); |
| 143 FOR_EACH_OBSERVER(Observer, observers_, OnGCMRegistrationResult(true)); | 143 FOR_EACH_OBSERVER(Observer, observers_, OnGCMRegistrationResult(true)); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace proximity_auth | 146 } // namespace proximity_auth |
| OLD | NEW |