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

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

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698