| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "android_webview/browser/aw_browser_policy_connector.h" | 5 #include "android_webview/browser/aw_browser_policy_connector.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "components/policy/core/browser/android/android_combined_policy_provide
r.h" | 10 #include "components/policy/core/browser/android/android_combined_policy_provide
r.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildHandlerList( | 32 std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildHandlerList( |
| 33 const policy::Schema& chrome_schema) { | 33 const policy::Schema& chrome_schema) { |
| 34 std::unique_ptr<policy::ConfigurationPolicyHandlerList> handlers( | 34 std::unique_ptr<policy::ConfigurationPolicyHandlerList> handlers( |
| 35 new policy::ConfigurationPolicyHandlerList( | 35 new policy::ConfigurationPolicyHandlerList( |
| 36 base::Bind(&PopulatePolicyHandlerParameters), | 36 base::Bind(&PopulatePolicyHandlerParameters), |
| 37 base::Bind(&GetChromePolicyDetails))); | 37 base::Bind(&GetChromePolicyDetails))); |
| 38 | 38 |
| 39 // URL Filtering | 39 // URL Filtering |
| 40 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( | 40 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( |
| 41 policy::key::kURLWhitelist, policy::policy_prefs::kUrlWhitelist, | 41 policy::key::kURLWhitelist, policy::policy_prefs::kUrlWhitelist, |
| 42 base::Value::TYPE_LIST)); | 42 base::Value::Type::LIST)); |
| 43 handlers->AddHandler(base::MakeUnique<policy::URLBlacklistPolicyHandler>()); | 43 handlers->AddHandler(base::MakeUnique<policy::URLBlacklistPolicyHandler>()); |
| 44 | 44 |
| 45 // HTTP Negotiate authentication | 45 // HTTP Negotiate authentication |
| 46 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( | 46 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( |
| 47 policy::key::kAuthServerWhitelist, prefs::kAuthServerWhitelist, | 47 policy::key::kAuthServerWhitelist, prefs::kAuthServerWhitelist, |
| 48 base::Value::TYPE_STRING)); | 48 base::Value::Type::STRING)); |
| 49 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( | 49 handlers->AddHandler(base::MakeUnique<policy::SimplePolicyHandler>( |
| 50 policy::key::kAuthAndroidNegotiateAccountType, | 50 policy::key::kAuthAndroidNegotiateAccountType, |
| 51 prefs::kAuthAndroidNegotiateAccountType, base::Value::TYPE_STRING)); | 51 prefs::kAuthAndroidNegotiateAccountType, base::Value::Type::STRING)); |
| 52 | 52 |
| 53 // Web restrictions | 53 // Web restrictions |
| 54 handlers->AddHandler(base::WrapUnique(new policy::SimplePolicyHandler( | 54 handlers->AddHandler(base::WrapUnique(new policy::SimplePolicyHandler( |
| 55 policy::key::kWebRestrictionsAuthority, prefs::kWebRestrictionsAuthority, | 55 policy::key::kWebRestrictionsAuthority, prefs::kWebRestrictionsAuthority, |
| 56 base::Value::TYPE_STRING))); | 56 base::Value::Type::STRING))); |
| 57 | 57 |
| 58 return handlers; | 58 return handlers; |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace | 61 } // namespace |
| 62 | 62 |
| 63 AwBrowserPolicyConnector::AwBrowserPolicyConnector() | 63 AwBrowserPolicyConnector::AwBrowserPolicyConnector() |
| 64 : BrowserPolicyConnectorBase(base::Bind(&BuildHandlerList)) { | 64 : BrowserPolicyConnectorBase(base::Bind(&BuildHandlerList)) { |
| 65 SetPlatformPolicyProvider( | 65 SetPlatformPolicyProvider( |
| 66 base::MakeUnique<policy::android::AndroidCombinedPolicyProvider>( | 66 base::MakeUnique<policy::android::AndroidCombinedPolicyProvider>( |
| 67 GetSchemaRegistry())); | 67 GetSchemaRegistry())); |
| 68 InitPolicyProviders(); | 68 InitPolicyProviders(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 AwBrowserPolicyConnector::~AwBrowserPolicyConnector() {} | 71 AwBrowserPolicyConnector::~AwBrowserPolicyConnector() {} |
| 72 | 72 |
| 73 } // namespace android_webview | 73 } // namespace android_webview |
| OLD | NEW |