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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: . Created 5 years, 3 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 // |params->setup_service_uuid|. 1059 // |params->setup_service_uuid|.
1060 connection_finder_.reset( 1060 connection_finder_.reset(
1061 new proximity_auth::BluetoothLowEnergyConnectionFinder( 1061 new proximity_auth::BluetoothLowEnergyConnectionFinder(
1062 proximity_auth::RemoteDevice(), params->setup_service_uuid, 1062 proximity_auth::RemoteDevice(), params->setup_service_uuid,
1063 proximity_auth::BluetoothLowEnergyConnectionFinder::FIND_ANY_DEVICE, 1063 proximity_auth::BluetoothLowEnergyConnectionFinder::FIND_ANY_DEVICE,
1064 nullptr, bluetooth_throttler_.get(), 3)); 1064 nullptr, bluetooth_throttler_.get(), 3));
1065 1065
1066 connection_finder_->Find(base::Bind( 1066 connection_finder_->Find(base::Bind(
1067 &EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this)); 1067 &EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this));
1068 1068
1069 timer_.reset( 1069 timer_.reset(new base::OneShotTimer());
1070 new base::OneShotTimer<EasyUnlockPrivateFindSetupConnectionFunction>());
1071 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out), 1070 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out),
1072 base::Bind(&EasyUnlockPrivateFindSetupConnectionFunction:: 1071 base::Bind(&EasyUnlockPrivateFindSetupConnectionFunction::
1073 OnConnectionFinderTimedOut, 1072 OnConnectionFinderTimedOut,
1074 this)); 1073 this));
1075 1074
1076 return true; 1075 return true;
1077 } 1076 }
1078 1077
1079 } // namespace extensions 1078 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698