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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64url.h" 10 #include "base/base64url.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 proximity_auth::bluetooth_util::SeekDeviceByAddress( 485 proximity_auth::bluetooth_util::SeekDeviceByAddress(
486 params->device_address, 486 params->device_address,
487 base::Bind( 487 base::Bind(
488 &EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekSuccess, 488 &EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekSuccess,
489 this), 489 this),
490 base::Bind( 490 base::Bind(
491 &EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekFailure, 491 &EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekFailure,
492 this), 492 this),
493 base::CreateTaskRunnerWithTraits( 493 base::CreateTaskRunnerWithTraits(
494 base::TaskTraits() 494 {base::MayBlock(), base::TaskPriority::BACKGROUND,
495 .MayBlock() 495 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN})
496 .WithPriority(base::TaskPriority::BACKGROUND)
497 .WithShutdownBehavior(
498 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN))
499 .get()); 496 .get());
500 return true; 497 return true;
501 } 498 }
502 499
503 void EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekSuccess() { 500 void EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekSuccess() {
504 SendResponse(true); 501 SendResponse(true);
505 } 502 }
506 503
507 void EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekFailure( 504 void EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction::OnSeekFailure(
508 const std::string& error_message) { 505 const std::string& error_message) {
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 GetConnectionManager(browser_context()) 1174 GetConnectionManager(browser_context())
1178 ->GetDeviceAddress(extension(), params->connection_id); 1175 ->GetDeviceAddress(extension(), params->connection_id);
1179 if (device_address.empty()) 1176 if (device_address.empty())
1180 return RespondNow(Error("Invalid connectionId.")); 1177 return RespondNow(Error("Invalid connectionId."));
1181 return RespondNow(ArgumentList( 1178 return RespondNow(ArgumentList(
1182 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create( 1179 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create(
1183 device_address))); 1180 device_address)));
1184 } 1181 }
1185 1182
1186 } // namespace extensions 1183 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698