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

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

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 Profile* profile = Profile::FromBrowserContext(browser_context()); 1043 Profile* profile = Profile::FromBrowserContext(browser_context());
1044 EasyUnlockService::Get(profile) 1044 EasyUnlockService::Get(profile)
1045 ->SetAutoPairingResult(params->result.success, error_message); 1045 ->SetAutoPairingResult(params->result.success, error_message);
1046 1046
1047 return true; 1047 return true;
1048 } 1048 }
1049 1049
1050 EasyUnlockPrivateFindSetupConnectionFunction:: 1050 EasyUnlockPrivateFindSetupConnectionFunction::
1051 EasyUnlockPrivateFindSetupConnectionFunction() 1051 EasyUnlockPrivateFindSetupConnectionFunction()
1052 : bluetooth_throttler_(new proximity_auth::BluetoothThrottlerImpl( 1052 : bluetooth_throttler_(new proximity_auth::BluetoothThrottlerImpl(
1053 base::WrapUnique(new base::DefaultTickClock()))) {} 1053 base::MakeUnique<base::DefaultTickClock>())) {}
1054 1054
1055 EasyUnlockPrivateFindSetupConnectionFunction:: 1055 EasyUnlockPrivateFindSetupConnectionFunction::
1056 ~EasyUnlockPrivateFindSetupConnectionFunction() { 1056 ~EasyUnlockPrivateFindSetupConnectionFunction() {
1057 // |connection_finder_| has a raw pointer to |bluetooth_throttler_|, so it 1057 // |connection_finder_| has a raw pointer to |bluetooth_throttler_|, so it
1058 // should be destroyed first. 1058 // should be destroyed first.
1059 connection_finder_.reset(); 1059 connection_finder_.reset();
1060 bluetooth_throttler_.reset(); 1060 bluetooth_throttler_.reset();
1061 } 1061 }
1062 1062
1063 void EasyUnlockPrivateFindSetupConnectionFunction:: 1063 void EasyUnlockPrivateFindSetupConnectionFunction::
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 ->GetDeviceAddress(extension(), params->connection_id); 1178 ->GetDeviceAddress(extension(), params->connection_id);
1179 results_ = 1179 results_ =
1180 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create( 1180 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create(
1181 device_address); 1181 device_address);
1182 if (device_address.empty()) 1182 if (device_address.empty())
1183 SetError("Invalid connectionId."); 1183 SetError("Invalid connectionId.");
1184 return true; 1184 return true;
1185 } 1185 }
1186 1186
1187 } // namespace extensions 1187 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698