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

Side by Side Diff: components/cryptauth/cryptauth_gcm_manager_impl.cc

Issue 2502343003: Moved //components/proximity_auth/cryptauth to //components/cryptauth. (Closed)
Patch Set: Fixed proto #includes. Created 4 years, 1 month 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
OLDNEW
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/cryptauth/cryptauth_gcm_manager_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "components/cryptauth/pref_names.h"
9 #include "components/gcm_driver/gcm_driver.h" 10 #include "components/gcm_driver/gcm_driver.h"
10 #include "components/prefs/pref_service.h" 11 #include "components/prefs/pref_service.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 cryptauth {
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
21 // The GCM sender id identifies the CryptAuth server. 21 // The GCM sender id identifies the CryptAuth server.
22 const char kCryptAuthGCMSenderId[] = "381449029288"; 22 const char kCryptAuthGCMSenderId[] = "381449029288";
23 23
24 // The 'registrationTickleType' key-value pair is present in GCM push 24 // The 'registrationTickleType' key-value pair is present in GCM push
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return; 140 return;
141 } 141 }
142 142
143 PA_LOG(INFO) << "GCM registration success, registration_id=" 143 PA_LOG(INFO) << "GCM registration success, registration_id="
144 << registration_id; 144 << registration_id;
145 pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id); 145 pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id);
146 for (auto& observer : observers_) 146 for (auto& observer : observers_)
147 observer.OnGCMRegistrationResult(true); 147 observer.OnGCMRegistrationResult(true);
148 } 148 }
149 149
150 } // namespace proximity_auth 150 } // namespace cryptauth
OLDNEW
« no previous file with comments | « components/cryptauth/cryptauth_gcm_manager_impl.h ('k') | components/cryptauth/cryptauth_gcm_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698