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 "extensions/browser/api/networking_private/networking_private_api.h" | 5 #include "extensions/browser/api/networking_private/networking_private_api.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1048 DCHECK(policy_dict); | 1048 DCHECK(policy_dict); |
1049 // private_api::GlobalPolicy is a subset of the global policy dictionary | 1049 // private_api::GlobalPolicy is a subset of the global policy dictionary |
1050 // (by definition), so use the api setter/getter to generate the subset. | 1050 // (by definition), so use the api setter/getter to generate the subset. |
1051 std::unique_ptr<private_api::GlobalPolicy> policy( | 1051 std::unique_ptr<private_api::GlobalPolicy> policy( |
1052 private_api::GlobalPolicy::FromValue(*policy_dict)); | 1052 private_api::GlobalPolicy::FromValue(*policy_dict)); |
1053 DCHECK(policy); | 1053 DCHECK(policy); |
1054 return RespondNow( | 1054 return RespondNow( |
1055 ArgumentList(private_api::GetGlobalPolicy::Results::Create(*policy))); | 1055 ArgumentList(private_api::GetGlobalPolicy::Results::Create(*policy))); |
1056 } | 1056 } |
1057 | 1057 |
1058 //////////////////////////////////////////////////////////////////////////////// | |
1059 // NetworkingPrivateGetCertificateListsFunction | |
1060 | |
1061 NetworkingPrivateGetCertificateListsFunction:: | |
1062 ~NetworkingPrivateGetCertificateListsFunction() {} | |
1063 | |
1064 ExtensionFunction::ResponseAction | |
1065 NetworkingPrivateGetCertificateListsFunction::Run() { | |
1066 std::unique_ptr<base::DictionaryValue> certificate_lists( | |
tbarzic
2017/05/17 22:35:57
I guess we're OK with exposing this as part of the
stevenjb
2017/05/18 16:30:57
semi-public :P It doesn't add any more vulnerabili
| |
1067 GetDelegate(browser_context())->GetCertificateLists()); | |
1068 DCHECK(certificate_lists); | |
1069 return RespondNow(OneArgument(std::move(certificate_lists))); | |
1070 } | |
1071 | |
1058 } // namespace extensions | 1072 } // namespace extensions |
OLD | NEW |