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

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: Rebase Created 4 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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64url.h" 10 #include "base/base64url.h"
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 Profile* profile = Profile::FromBrowserContext(browser_context()); 1044 Profile* profile = Profile::FromBrowserContext(browser_context());
1045 EasyUnlockService::Get(profile) 1045 EasyUnlockService::Get(profile)
1046 ->SetAutoPairingResult(params->result.success, error_message); 1046 ->SetAutoPairingResult(params->result.success, error_message);
1047 1047
1048 return RespondNow(NoArguments()); 1048 return RespondNow(NoArguments());
1049 } 1049 }
1050 1050
1051 EasyUnlockPrivateFindSetupConnectionFunction:: 1051 EasyUnlockPrivateFindSetupConnectionFunction::
1052 EasyUnlockPrivateFindSetupConnectionFunction() 1052 EasyUnlockPrivateFindSetupConnectionFunction()
1053 : bluetooth_throttler_(new proximity_auth::BluetoothThrottlerImpl( 1053 : bluetooth_throttler_(new proximity_auth::BluetoothThrottlerImpl(
1054 base::WrapUnique(new base::DefaultTickClock()))) {} 1054 base::MakeUnique<base::DefaultTickClock>())) {}
1055 1055
1056 EasyUnlockPrivateFindSetupConnectionFunction:: 1056 EasyUnlockPrivateFindSetupConnectionFunction::
1057 ~EasyUnlockPrivateFindSetupConnectionFunction() { 1057 ~EasyUnlockPrivateFindSetupConnectionFunction() {
1058 // |connection_finder_| has a raw pointer to |bluetooth_throttler_|, so it 1058 // |connection_finder_| has a raw pointer to |bluetooth_throttler_|, so it
1059 // should be destroyed first. 1059 // should be destroyed first.
1060 connection_finder_.reset(); 1060 connection_finder_.reset();
1061 bluetooth_throttler_.reset(); 1061 bluetooth_throttler_.reset();
1062 } 1062 }
1063 1063
1064 void EasyUnlockPrivateFindSetupConnectionFunction:: 1064 void EasyUnlockPrivateFindSetupConnectionFunction::
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 GetConnectionManager(browser_context()) 1181 GetConnectionManager(browser_context())
1182 ->GetDeviceAddress(extension(), params->connection_id); 1182 ->GetDeviceAddress(extension(), params->connection_id);
1183 if (device_address.empty()) 1183 if (device_address.empty())
1184 return RespondNow(Error("Invalid connectionId.")); 1184 return RespondNow(Error("Invalid connectionId."));
1185 return RespondNow(ArgumentList( 1185 return RespondNow(ArgumentList(
1186 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create( 1186 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create(
1187 device_address))); 1187 device_address)));
1188 } 1188 }
1189 1189
1190 } // namespace extensions 1190 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698