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

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

Issue 2108923002: device: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: device Created 4 years, 4 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 | « no previous file | device/bluetooth/bluetooth_discovery_filter.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 (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.h" 5 #include "device/bluetooth/bluetooth_adapter.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 329 }
330 330
331 std::unique_ptr<BluetoothDiscoveryFilter> 331 std::unique_ptr<BluetoothDiscoveryFilter>
332 BluetoothAdapter::GetMergedDiscoveryFilterHelper( 332 BluetoothAdapter::GetMergedDiscoveryFilterHelper(
333 const BluetoothDiscoveryFilter* masked_filter, 333 const BluetoothDiscoveryFilter* masked_filter,
334 bool omit) const { 334 bool omit) const {
335 std::unique_ptr<BluetoothDiscoveryFilter> result; 335 std::unique_ptr<BluetoothDiscoveryFilter> result;
336 bool first_merge = true; 336 bool first_merge = true;
337 337
338 std::set<BluetoothDiscoverySession*> temp(discovery_sessions_); 338 std::set<BluetoothDiscoverySession*> temp(discovery_sessions_);
339 for (const auto& iter : temp) { 339 for (auto* iter : temp) {
340 const BluetoothDiscoveryFilter* curr_filter = iter->GetDiscoveryFilter(); 340 const BluetoothDiscoveryFilter* curr_filter = iter->GetDiscoveryFilter();
341 341
342 if (!iter->IsActive()) 342 if (!iter->IsActive())
343 continue; 343 continue;
344 344
345 if (omit && curr_filter == masked_filter) { 345 if (omit && curr_filter == masked_filter) {
346 // if masked_filter is pointing to empty filter, and there are 346 // if masked_filter is pointing to empty filter, and there are
347 // multiple empty filters in discovery_sessions_, make sure we'll 347 // multiple empty filters in discovery_sessions_, make sure we'll
348 // process next empty sessions. 348 // process next empty sessions.
349 omit = false; 349 omit = false;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 UMA_HISTOGRAM_ENUMERATION( 411 UMA_HISTOGRAM_ENUMERATION(
412 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome), 412 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome),
413 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT)); 413 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT));
414 } 414 }
415 415
416 // static 416 // static
417 const base::TimeDelta BluetoothAdapter::timeoutSec = 417 const base::TimeDelta BluetoothAdapter::timeoutSec =
418 base::TimeDelta::FromSeconds(180); 418 base::TimeDelta::FromSeconds(180);
419 419
420 } // namespace device 420 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_discovery_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698