diff options
Diffstat (limited to 'chrome/browser')
| -rw-r--r-- | chrome/browser/BUILD.gn | 56 | ||||
| -rw-r--r-- | chrome/browser/extensions/BUILD.gn | 12 | ||||
| -rw-r--r-- | chrome/browser/policy/BUILD.gn | 2 | ||||
| -rw-r--r-- | chrome/browser/policy/profile_policy_connector_stub.cc | 40 | ||||
| -rw-r--r-- | chrome/browser/ui/BUILD.gn | 7 |
5 files changed, 103 insertions, 14 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 0bc2ce4..149156d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -150,9 +150,7 @@ source_set("browser") { "//components/packed_ct_ev_whitelist", "//components/password_manager/core/browser", "//components/password_manager/core/common", - "//components/policy", "//components/policy:policy_component", - "//components/policy/proto", "//components/proxy_config", "//components/query_parser", "//components/rappor", @@ -422,21 +420,17 @@ source_set("browser") { if (!is_win && !is_mac && !is_ios) { sources += [ "net/net_error_diagnostics_dialog_generic.cc" ] } - if (!is_android && !is_ios && !is_chromeos) { + if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) { sources += [ "net/disk_cache_dir_policy_handler.cc", "net/disk_cache_dir_policy_handler.h", ] } - if (!is_android && !is_ios) { + if (!is_android && !is_ios && enable_configuration_policy) { sources += [ "download/download_dir_policy_handler.cc", "download/download_dir_policy_handler.h", ] - deps += [ - "//chrome/browser/policy:path_parser", - "//net:net_browser_services", - ] } if (is_mac) { sources += @@ -504,6 +498,48 @@ source_set("browser") { deps += [ "//components/nacl/browser" ] } + if (enable_configuration_policy) { + sources += + rebase_path(gypi_values.chrome_browser_policy_shared_with_ios_sources, + ".", + "//chrome") + deps += [ + "//components/policy", + "//components/policy/proto", + ] + if (!is_ios) { + sources += rebase_path(gypi_values.chrome_browser_policy_non_ios_sources, + ".", + "//chrome") + } + if (!is_chromeos) { + sources += rebase_path( + gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources, + ".", + "//chrome") + } + if (is_win || is_mac || is_desktop_linux) { + sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources, + ".", + "//chrome") + } + if (is_android || is_ios) { + sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources, + ".", + "//chrome") + } else { + deps += [ + "//chrome/browser/policy:path_parser", + "//net:net_browser_services", + ] + } + } else { + # Configuration policy disabled. + sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources, + ".", + "//chrome") + } + if (enable_plugins) { sources += rebase_path(gypi_values.chrome_browser_plugins_sources, ".", "//chrome") @@ -562,10 +598,6 @@ source_set("browser") { ".", "//chrome") deps += [ "//chrome/browser/chromeos" ] - } else { # Non-ChromeOS. - sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources, - ".", - "//chrome") } if (is_chromeos || is_ios) { diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn index 35aeeaa..a512418 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn @@ -47,7 +47,6 @@ source_set("extensions") { "//components/data_reduction_proxy/proto:data_reduction_proxy_proto", "//components/dom_distiller/core", "//components/onc", - "//components/policy", "//components/proximity_auth", "//components/resources", "//components/strings", @@ -163,6 +162,17 @@ source_set("extensions") { } } + if (enable_configuration_policy) { + deps += [ "//components/policy" ] + sources += [ + "policy_handlers.cc", + "policy_handlers.h", + ] + sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources, + ".", + "//chrome") + } + if (enable_webrtc) { sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ] } else { diff --git a/chrome/browser/policy/BUILD.gn b/chrome/browser/policy/BUILD.gn index 4f7ce16..d14578b 100644 --- a/chrome/browser/policy/BUILD.gn +++ b/chrome/browser/policy/BUILD.gn @@ -4,6 +4,8 @@ import("//build/config/features.gni") +assert(enable_configuration_policy) + source_set("path_parser") { sources = [ "policy_path_parser.h", diff --git a/chrome/browser/policy/profile_policy_connector_stub.cc b/chrome/browser/policy/profile_policy_connector_stub.cc new file mode 100644 index 0000000..39a1b36 --- /dev/null +++ b/chrome/browser/policy/profile_policy_connector_stub.cc @@ -0,0 +1,40 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <utility> + +#include "chrome/browser/policy/profile_policy_connector.h" +#include "components/policy/core/common/policy_service_stub.h" + +namespace policy { + +ProfilePolicyConnector::ProfilePolicyConnector() {} + +ProfilePolicyConnector::~ProfilePolicyConnector() {} + +void ProfilePolicyConnector::Init( + SchemaRegistry* schema_registry, + CloudPolicyManager* user_cloud_policy_manager) { + policy_service_.reset(new PolicyServiceStub()); +} + +void ProfilePolicyConnector::InitForTesting(scoped_ptr<PolicyService> service) { + policy_service_ = std::move(service); +} + +void ProfilePolicyConnector::Shutdown() {} + +bool ProfilePolicyConnector::IsManaged() const { + return false; +} + +std::string ProfilePolicyConnector::GetManagementDomain() const { + return ""; +} + +bool ProfilePolicyConnector::IsPolicyFromCloudPolicy(const char* name) const { + return false; +} + +} // namespace policy diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 9b6799e..6618242 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn @@ -83,7 +83,6 @@ source_set("ui") { "//components/password_manager/content/browser", "//components/password_manager/core/browser", "//components/pdf/browser", - "//components/policy", "//components/pref_registry", "//components/proximity_auth", "//components/proxy_config", @@ -220,6 +219,12 @@ source_set("ui") { rebase_path(gypi_values.chrome_browser_ui_nacl_sources, ".", "//chrome") deps += [ "//native_client/src/trusted/service_runtime:sel" ] } + if (enable_configuration_policy) { + sources += rebase_path(gypi_values.chrome_browser_ui_policy_sources, + ".", + "//chrome") + deps += [ "//components/policy" ] + } if (enable_plugins) { sources += rebase_path(gypi_values.chrome_browser_ui_plugin_sources, ".", |
