OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <memory> |
5 #include <utility> | 6 #include <utility> |
6 | 7 |
7 #include "base/bind.h" | 8 #include "base/bind.h" |
8 #include "base/callback.h" | 9 #include "base/callback.h" |
9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chromeos/login/helper.h" | 13 #include "chrome/browser/chromeos/login/helper.h" |
14 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 14 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
15 #include "chrome/browser/extensions/api/networking_private/networking_private_cr
edentials_getter.h" | 15 #include "chrome/browser/extensions/api/networking_private/networking_private_cr
edentials_getter.h" |
16 #include "chrome/browser/extensions/api/networking_private/networking_private_ui
_delegate_chromeos.h" | 16 #include "chrome/browser/extensions/api/networking_private/networking_private_ui
_delegate_chromeos.h" |
17 #include "chrome/browser/extensions/extension_apitest.h" | 17 #include "chrome/browser/extensions/extension_apitest.h" |
18 #include "chromeos/chromeos_switches.h" | 18 #include "chromeos/chromeos_switches.h" |
19 #include "chromeos/cryptohome/cryptohome_parameters.h" | 19 #include "chromeos/cryptohome/cryptohome_parameters.h" |
20 #include "chromeos/dbus/cryptohome_client.h" | 20 #include "chromeos/dbus/cryptohome_client.h" |
21 #include "chromeos/dbus/dbus_thread_manager.h" | 21 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 void AddService(const std::string& service_path, | 262 void AddService(const std::string& service_path, |
263 const std::string& name, | 263 const std::string& name, |
264 const std::string& type, | 264 const std::string& type, |
265 const std::string& state) { | 265 const std::string& state) { |
266 service_test_->AddService(service_path, service_path + "_guid", name, type, | 266 service_test_->AddService(service_path, service_path + "_guid", name, type, |
267 state, true /* add_to_visible */); | 267 state, true /* add_to_visible */); |
268 } | 268 } |
269 | 269 |
270 static scoped_ptr<KeyedService> CreateNetworkingPrivateServiceClient( | 270 static std::unique_ptr<KeyedService> CreateNetworkingPrivateServiceClient( |
271 content::BrowserContext* context) { | 271 content::BrowserContext* context) { |
272 scoped_ptr<CryptoVerifyStub> crypto_verify(new CryptoVerifyStub); | 272 std::unique_ptr<CryptoVerifyStub> crypto_verify(new CryptoVerifyStub); |
273 scoped_ptr<NetworkingPrivateDelegate> result( | 273 std::unique_ptr<NetworkingPrivateDelegate> result( |
274 new NetworkingPrivateChromeOS(context, std::move(crypto_verify))); | 274 new NetworkingPrivateChromeOS(context, std::move(crypto_verify))); |
275 scoped_ptr<NetworkingPrivateDelegate::UIDelegate> ui_delegate( | 275 std::unique_ptr<NetworkingPrivateDelegate::UIDelegate> ui_delegate( |
276 new UIDelegateStub); | 276 new UIDelegateStub); |
277 result->set_ui_delegate(std::move(ui_delegate)); | 277 result->set_ui_delegate(std::move(ui_delegate)); |
278 return std::move(result); | 278 return std::move(result); |
279 } | 279 } |
280 | 280 |
281 void SetUpOnMainThread() override { | 281 void SetUpOnMainThread() override { |
282 detector_ = new NetworkPortalDetectorTestImpl(); | 282 detector_ = new NetworkPortalDetectorTestImpl(); |
283 chromeos::network_portal_detector::InitializeForTesting(detector_); | 283 chromeos::network_portal_detector::InitializeForTesting(detector_); |
284 | 284 |
285 ExtensionApiTest::SetUpOnMainThread(); | 285 ExtensionApiTest::SetUpOnMainThread(); |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 } | 707 } |
708 | 708 |
709 IN_PROC_BROWSER_TEST_F(NetworkingPrivateChromeOSApiTest, CellularSimPuk) { | 709 IN_PROC_BROWSER_TEST_F(NetworkingPrivateChromeOSApiTest, CellularSimPuk) { |
710 SetupCellular(); | 710 SetupCellular(); |
711 // Lock the SIM | 711 // Lock the SIM |
712 device_test_->SetSimLocked(kCellularDevicePath, true); | 712 device_test_->SetSimLocked(kCellularDevicePath, true); |
713 EXPECT_TRUE(RunNetworkingSubtest("cellularSimPuk")) << message_; | 713 EXPECT_TRUE(RunNetworkingSubtest("cellularSimPuk")) << message_; |
714 } | 714 } |
715 | 715 |
716 } // namespace | 716 } // namespace |
OLD | NEW |