Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/json/json_string_value_serializer.h" | |
|
tbarzic
2017/05/17 22:35:57
not needed?
stevenjb
2017/05/18 16:30:57
oops. done.
| |
| 15 #include "base/logging.h" | 16 #include "base/logging.h" |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 19 #include "chrome/browser/extensions/api/networking_cast_private/chrome_networkin g_cast_private_delegate.h" | 20 #include "chrome/browser/extensions/api/networking_cast_private/chrome_networkin g_cast_private_delegate.h" |
| 20 #include "chrome/browser/extensions/extension_apitest.h" | 21 #include "chrome/browser/extensions/extension_apitest.h" |
| 21 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
| 22 #include "components/onc/onc_constants.h" | 23 #include "components/onc/onc_constants.h" |
| 23 #include "content/public/test/test_utils.h" | 24 #include "content/public/test/test_utils.h" |
| 24 #include "extensions/browser/api/networking_private/networking_private_delegate. h" | 25 #include "extensions/browser/api/networking_private/networking_private_delegate. h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 properties->type = api::networking_private::NETWORK_TYPE_ETHERNET; | 186 properties->type = api::networking_private::NETWORK_TYPE_ETHERNET; |
| 186 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; | 187 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; |
| 187 result->push_back(std::move(properties)); | 188 result->push_back(std::move(properties)); |
| 188 return result; | 189 return result; |
| 189 } | 190 } |
| 190 | 191 |
| 191 std::unique_ptr<base::DictionaryValue> GetGlobalPolicy() override { | 192 std::unique_ptr<base::DictionaryValue> GetGlobalPolicy() override { |
| 192 return base::MakeUnique<base::DictionaryValue>(); | 193 return base::MakeUnique<base::DictionaryValue>(); |
| 193 } | 194 } |
| 194 | 195 |
| 196 std::unique_ptr<base::DictionaryValue> GetCertificateLists() override { | |
| 197 return base::MakeUnique<base::DictionaryValue>(); | |
| 198 } | |
| 199 | |
| 195 bool EnableNetworkType(const std::string& type) override { | 200 bool EnableNetworkType(const std::string& type) override { |
| 196 enabled_[type] = true; | 201 enabled_[type] = true; |
| 197 return !fail_; | 202 return !fail_; |
| 198 } | 203 } |
| 199 | 204 |
| 200 bool DisableNetworkType(const std::string& type) override { | 205 bool DisableNetworkType(const std::string& type) override { |
| 201 disabled_[type] = true; | 206 disabled_[type] = true; |
| 202 return !fail_; | 207 return !fail_; |
| 203 } | 208 } |
| 204 | 209 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 EXPECT_FALSE(RunNetworkingSubtest("unlockCellularSim")) << message_; | 639 EXPECT_FALSE(RunNetworkingSubtest("unlockCellularSim")) << message_; |
| 635 } | 640 } |
| 636 | 641 |
| 637 IN_PROC_BROWSER_TEST_F(NetworkingPrivateApiTestFail, SetCellularSimState) { | 642 IN_PROC_BROWSER_TEST_F(NetworkingPrivateApiTestFail, SetCellularSimState) { |
| 638 EXPECT_FALSE(RunNetworkingSubtest("setCellularSimState")) << message_; | 643 EXPECT_FALSE(RunNetworkingSubtest("setCellularSimState")) << message_; |
| 639 } | 644 } |
| 640 | 645 |
| 641 #endif // defined(OS_WIN) | 646 #endif // defined(OS_WIN) |
| 642 | 647 |
| 643 } // namespace extensions | 648 } // namespace extensions |
| OLD | NEW |