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

Side by Side Diff: remoting/host/gcd_state_updater.cc

Issue 2888733002: Adding ThreadChecker validation to d'tors for host classes (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « remoting/host/chromeos/clipboard_aura.cc ('k') | remoting/host/heartbeat_sender.cc » ('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 "remoting/host/gcd_state_updater.h" 5 #include "remoting/host/gcd_state_updater.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 26 matching lines...) Expand all
37 DCHECK(signal_strategy_); 37 DCHECK(signal_strategy_);
38 DCHECK(thread_checker_.CalledOnValidThread()); 38 DCHECK(thread_checker_.CalledOnValidThread());
39 39
40 signal_strategy_->AddListener(this); 40 signal_strategy_->AddListener(this);
41 41
42 // Update state if the |signal_strategy_| is already connected. 42 // Update state if the |signal_strategy_| is already connected.
43 OnSignalStrategyStateChange(signal_strategy_->GetState()); 43 OnSignalStrategyStateChange(signal_strategy_->GetState());
44 } 44 }
45 45
46 GcdStateUpdater::~GcdStateUpdater() { 46 GcdStateUpdater::~GcdStateUpdater() {
47 DCHECK(thread_checker_.CalledOnValidThread());
47 signal_strategy_->RemoveListener(this); 48 signal_strategy_->RemoveListener(this);
48 } 49 }
49 50
50 void GcdStateUpdater::SetHostOfflineReason( 51 void GcdStateUpdater::SetHostOfflineReason(
51 const std::string& host_offline_reason, 52 const std::string& host_offline_reason,
52 const base::TimeDelta& timeout, 53 const base::TimeDelta& timeout,
53 const base::Callback<void(bool success)>& ack_callback) { 54 const base::Callback<void(bool success)>& ack_callback) {
54 // TODO(jrw): Implement this. Refer to 55 // TODO(jrw): Implement this. Refer to
55 // HeartbeatSender::SetHostOfflineReason. 56 // HeartbeatSender::SetHostOfflineReason.
56 NOTIMPLEMENTED(); 57 NOTIMPLEMENTED();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base_state->SetString("_hostVersion", STRINGIZE(VERSION)); 122 base_state->SetString("_hostVersion", STRINGIZE(VERSION));
122 patch->Set("base", std::move(base_state)); 123 patch->Set("base", std::move(base_state));
123 124
124 // Send the update to GCD. 125 // Send the update to GCD.
125 gcd_rest_client_->PatchState( 126 gcd_rest_client_->PatchState(
126 std::move(patch), 127 std::move(patch),
127 base::Bind(&GcdStateUpdater::OnPatchStateResult, base::Unretained(this))); 128 base::Bind(&GcdStateUpdater::OnPatchStateResult, base::Unretained(this)));
128 } 129 }
129 130
130 } // namespace remoting 131 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromeos/clipboard_aura.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698