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

Side by Side Diff: components/cryptauth/cryptauth_enrollment_manager.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_enrollment_manager.h" 5 #include "components/cryptauth/cryptauth_enrollment_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64url.h" 9 #include "base/base64url.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/time/clock.h" 11 #include "base/time/clock.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "components/cryptauth/cryptauth_enroller.h"
14 #include "components/cryptauth/pref_names.h"
15 #include "components/cryptauth/secure_message_delegate.h"
16 #include "components/cryptauth/sync_scheduler_impl.h"
13 #include "components/prefs/pref_registry_simple.h" 17 #include "components/prefs/pref_registry_simple.h"
14 #include "components/prefs/pref_service.h" 18 #include "components/prefs/pref_service.h"
15 #include "components/proximity_auth/cryptauth/cryptauth_enroller.h"
16 #include "components/proximity_auth/cryptauth/pref_names.h"
17 #include "components/proximity_auth/cryptauth/secure_message_delegate.h"
18 #include "components/proximity_auth/cryptauth/sync_scheduler_impl.h"
19 #include "components/proximity_auth/logging/logging.h" 19 #include "components/proximity_auth/logging/logging.h"
20 20
21 namespace proximity_auth { 21 namespace cryptauth {
22 22
23 namespace { 23 namespace {
24 24
25 // The number of days that an enrollment is valid. Note that we try to refresh 25 // The number of days that an enrollment is valid. Note that we try to refresh
26 // the enrollment well before this time elapses. 26 // the enrollment well before this time elapses.
27 const int kValidEnrollmentPeriodDays = 45; 27 const int kValidEnrollmentPeriodDays = 45;
28 28
29 // The normal period between successful enrollments in days. 29 // The normal period between successful enrollments in days.
30 const int kEnrollmentRefreshPeriodDays = 30; 30 const int kEnrollmentRefreshPeriodDays = 30;
31 31
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 << " gcm_registration_id: " 294 << " gcm_registration_id: "
295 << device_info.gcm_registration_id(); 295 << device_info.gcm_registration_id();
296 296
297 cryptauth_enroller_ = enroller_factory_->CreateInstance(); 297 cryptauth_enroller_ = enroller_factory_->CreateInstance();
298 cryptauth_enroller_->Enroll( 298 cryptauth_enroller_->Enroll(
299 GetUserPublicKey(), GetUserPrivateKey(), device_info, invocation_reason, 299 GetUserPublicKey(), GetUserPrivateKey(), device_info, invocation_reason,
300 base::Bind(&CryptAuthEnrollmentManager::OnEnrollmentFinished, 300 base::Bind(&CryptAuthEnrollmentManager::OnEnrollmentFinished,
301 weak_ptr_factory_.GetWeakPtr())); 301 weak_ptr_factory_.GetWeakPtr()));
302 } 302 }
303 303
304 } // namespace proximity_auth 304 } // namespace cryptauth
OLDNEW
« no previous file with comments | « components/cryptauth/cryptauth_enrollment_manager.h ('k') | components/cryptauth/cryptauth_enrollment_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698