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

Side by Side Diff: device/bluetooth/bluetooth_adapter_win.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "device/bluetooth/bluetooth_adapter_win.h" 5 #include "device/bluetooth/bluetooth_adapter_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 task_manager_ = 351 task_manager_ =
352 new BluetoothTaskManagerWin(ui_task_runner_); 352 new BluetoothTaskManagerWin(ui_task_runner_);
353 task_manager_->AddObserver(this); 353 task_manager_->AddObserver(this);
354 task_manager_->Initialize(); 354 task_manager_->Initialize();
355 } 355 }
356 356
357 void BluetoothAdapterWin::InitForTest( 357 void BluetoothAdapterWin::InitForTest(
358 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, 358 scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
359 scoped_refptr<base::SequencedTaskRunner> bluetooth_task_runner) { 359 scoped_refptr<base::SequencedTaskRunner> bluetooth_task_runner) {
360 ui_task_runner_ = ui_task_runner; 360 ui_task_runner_ = ui_task_runner;
361 if (ui_task_runner_ == nullptr) 361 if (!ui_task_runner_)
362 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 362 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get();
363 task_manager_ = 363 task_manager_ =
364 new BluetoothTaskManagerWin(ui_task_runner_); 364 new BluetoothTaskManagerWin(ui_task_runner_);
365 task_manager_->AddObserver(this); 365 task_manager_->AddObserver(this);
366 task_manager_->InitializeWithBluetoothTaskRunner(bluetooth_task_runner); 366 task_manager_->InitializeWithBluetoothTaskRunner(bluetooth_task_runner);
367 } 367 }
368 368
369 void BluetoothAdapterWin::MaybePostStartDiscoveryTask() { 369 void BluetoothAdapterWin::MaybePostStartDiscoveryTask() {
370 if (discovery_status_ == NOT_DISCOVERING && 370 if (discovery_status_ == NOT_DISCOVERING &&
371 !on_start_discovery_callbacks_.empty()) { 371 !on_start_discovery_callbacks_.empty()) {
(...skipping 16 matching lines...) Expand all
388 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); 388 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size();
389 on_stop_discovery_callbacks_.clear(); 389 on_stop_discovery_callbacks_.clear();
390 return; 390 return;
391 } 391 }
392 392
393 discovery_status_ = DISCOVERY_STOPPING; 393 discovery_status_ = DISCOVERY_STOPPING;
394 task_manager_->PostStopDiscoveryTask(); 394 task_manager_->PostStopDiscoveryTask();
395 } 395 }
396 396
397 } // namespace device 397 } // namespace device
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698