Commit 32a53aee authored by Hidehiko Abe's avatar Hidehiko Abe Committed by Commit Bot

Use macros for ThreadChecker part 2.

BUG=None
TEST=Built locally. Ran trybots.

Change-Id: I97c13c15877ae48e03556a6ff1dfce7bc5e8f1d7
Reviewed-on: https://chromium-review.googlesource.com/544723Reviewed-by: default avatarLuis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481695}
parent da8516be
...@@ -28,17 +28,16 @@ ArcBootPhaseMonitorBridge::ArcBootPhaseMonitorBridge( ...@@ -28,17 +28,16 @@ ArcBootPhaseMonitorBridge::ArcBootPhaseMonitorBridge(
ArcBridgeService* bridge_service, ArcBridgeService* bridge_service,
const AccountId& account_id) const AccountId& account_id)
: ArcService(bridge_service), account_id_(account_id), binding_(this) { : ArcService(bridge_service), account_id_(account_id), binding_(this) {
DCHECK(thread_checker_.CalledOnValidThread());
arc_bridge_service()->boot_phase_monitor()->AddObserver(this); arc_bridge_service()->boot_phase_monitor()->AddObserver(this);
} }
ArcBootPhaseMonitorBridge::~ArcBootPhaseMonitorBridge() { ArcBootPhaseMonitorBridge::~ArcBootPhaseMonitorBridge() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
arc_bridge_service()->boot_phase_monitor()->RemoveObserver(this); arc_bridge_service()->boot_phase_monitor()->RemoveObserver(this);
} }
void ArcBootPhaseMonitorBridge::OnInstanceReady() { void ArcBootPhaseMonitorBridge::OnInstanceReady() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
auto* instance = ARC_GET_INSTANCE_FOR_METHOD( auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_bridge_service()->boot_phase_monitor(), Init); arc_bridge_service()->boot_phase_monitor(), Init);
DCHECK(instance); DCHECK(instance);
...@@ -48,11 +47,11 @@ void ArcBootPhaseMonitorBridge::OnInstanceReady() { ...@@ -48,11 +47,11 @@ void ArcBootPhaseMonitorBridge::OnInstanceReady() {
} }
void ArcBootPhaseMonitorBridge::OnInstanceClosed() { void ArcBootPhaseMonitorBridge::OnInstanceClosed() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
} }
void ArcBootPhaseMonitorBridge::OnBootCompleted() { void ArcBootPhaseMonitorBridge::OnBootCompleted() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
VLOG(2) << "OnBootCompleted"; VLOG(2) << "OnBootCompleted";
chromeos::SessionManagerClient* session_manager_client = chromeos::SessionManagerClient* session_manager_client =
......
...@@ -38,12 +38,12 @@ class ArcBootPhaseMonitorBridge ...@@ -38,12 +38,12 @@ class ArcBootPhaseMonitorBridge
void OnBootCompleted() override; void OnBootCompleted() override;
private: private:
THREAD_CHECKER(thread_checker_);
const AccountId account_id_; const AccountId account_id_;
mojo::Binding<mojom::BootPhaseMonitorHost> binding_; mojo::Binding<mojom::BootPhaseMonitorHost> binding_;
std::unique_ptr<ArcInstanceThrottle> throttle_; std::unique_ptr<ArcInstanceThrottle> throttle_;
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(ArcBootPhaseMonitorBridge); DISALLOW_COPY_AND_ASSIGN(ArcBootPhaseMonitorBridge);
}; };
......
...@@ -21,12 +21,12 @@ ArcEnterpriseReportingService::ArcEnterpriseReportingService( ...@@ -21,12 +21,12 @@ ArcEnterpriseReportingService::ArcEnterpriseReportingService(
} }
ArcEnterpriseReportingService::~ArcEnterpriseReportingService() { ArcEnterpriseReportingService::~ArcEnterpriseReportingService() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
arc_bridge_service()->enterprise_reporting()->RemoveObserver(this); arc_bridge_service()->enterprise_reporting()->RemoveObserver(this);
} }
void ArcEnterpriseReportingService::OnInstanceReady() { void ArcEnterpriseReportingService::OnInstanceReady() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
auto* instance = ARC_GET_INSTANCE_FOR_METHOD( auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_bridge_service()->enterprise_reporting(), Init); arc_bridge_service()->enterprise_reporting(), Init);
DCHECK(instance); DCHECK(instance);
...@@ -37,7 +37,7 @@ void ArcEnterpriseReportingService::OnInstanceReady() { ...@@ -37,7 +37,7 @@ void ArcEnterpriseReportingService::OnInstanceReady() {
void ArcEnterpriseReportingService::ReportManagementState( void ArcEnterpriseReportingService::ReportManagementState(
mojom::ManagementState state) { mojom::ManagementState state) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
VLOG(1) << "ReportManagementState state=" << state; VLOG(1) << "ReportManagementState state=" << state;
if (state == mojom::ManagementState::MANAGED_DO_LOST) { if (state == mojom::ManagementState::MANAGED_DO_LOST) {
......
...@@ -35,7 +35,7 @@ class ArcEnterpriseReportingService ...@@ -35,7 +35,7 @@ class ArcEnterpriseReportingService
void ReportManagementState(mojom::ManagementState state) override; void ReportManagementState(mojom::ManagementState state) override;
private: private:
base::ThreadChecker thread_checker_; THREAD_CHECKER(thread_checker_);
mojo::Binding<mojom::EnterpriseReportingHost> binding_; mojo::Binding<mojom::EnterpriseReportingHost> binding_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment