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

Side by Side Diff: components/cryptauth/sync_scheduler.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
« no previous file with comments | « components/cryptauth/sync_scheduler.h ('k') | components/cryptauth/sync_scheduler_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sync_scheduler.h" 5 #include "components/cryptauth/sync_scheduler.h"
6 6
7 #include "components/proximity_auth/logging/logging.h" 7 #include "components/proximity_auth/logging/logging.h"
8 8
9 namespace proximity_auth { 9 namespace cryptauth {
10 10
11 SyncScheduler::SyncRequest::SyncRequest( 11 SyncScheduler::SyncRequest::SyncRequest(
12 base::WeakPtr<SyncScheduler> sync_scheduler) 12 base::WeakPtr<SyncScheduler> sync_scheduler)
13 : sync_scheduler_(sync_scheduler), completed_(false) { 13 : sync_scheduler_(sync_scheduler), completed_(false) {
14 } 14 }
15 15
16 SyncScheduler::SyncRequest::~SyncRequest() { 16 SyncScheduler::SyncRequest::~SyncRequest() {
17 if (!completed_) 17 if (!completed_)
18 PA_LOG(ERROR) << "SyncRequest destroyed but Complete() was never called"; 18 PA_LOG(ERROR) << "SyncRequest destroyed but Complete() was never called";
19 } 19 }
20 20
21 void SyncScheduler::SyncRequest::OnDidComplete(bool success) { 21 void SyncScheduler::SyncRequest::OnDidComplete(bool success) {
22 if (sync_scheduler_) { 22 if (sync_scheduler_) {
23 sync_scheduler_->OnSyncCompleted(success); 23 sync_scheduler_->OnSyncCompleted(success);
24 sync_scheduler_.reset(); 24 sync_scheduler_.reset();
25 completed_ = true; 25 completed_ = true;
26 } else { 26 } else {
27 PA_LOG(ERROR) << "SyncRequest completed, but SyncScheduler destroyed."; 27 PA_LOG(ERROR) << "SyncRequest completed, but SyncScheduler destroyed.";
28 } 28 }
29 } 29 }
30 30
31 } // proximity_auth 31 } // proximity_auth
OLDNEW
« no previous file with comments | « components/cryptauth/sync_scheduler.h ('k') | components/cryptauth/sync_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698