diff options
Diffstat (limited to 'chromium/chromeos')
30 files changed, 1042 insertions, 472 deletions
diff --git a/chromium/chromeos/BUILD.gn b/chromium/chromeos/BUILD.gn index 30e3c1f06fa..36fb57c9ddc 100644 --- a/chromium/chromeos/BUILD.gn +++ b/chromium/chromeos/BUILD.gn @@ -8,16 +8,18 @@ import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") import("//third_party/protobuf/proto_library.gni") -assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos") - -declare_args() { - # Use binder. Binder related code is compiled only when true. - use_binder = false -} +assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos") component("chromeos") { configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ] public_deps = [ + ":chromeos_constants", + ":chromeos_export", + ":login_event_recorder", + "//chromeos/cryptohome", + "//chromeos/dbus", + "//chromeos/login", + "//chromeos/settings", "//dbus", ] deps = [ @@ -30,7 +32,10 @@ component("chromeos") { ":cryptohome_proto", ":login_manager_proto", ":media_perception_proto", + ":metrics_event_proto", + ":oobe_config_proto", ":power_manager_proto", + ":seneschal_proto", ":smbprovider_proto", ":vm_applications_apps_proto", "//base", @@ -39,7 +44,6 @@ component("chromeos") { "//components/account_id", "//components/device_event_log", "//components/onc", - "//components/password_manager/core/browser:password_hash_data", "//components/policy:cloud_policy_proto_generated_compile", "//components/policy/proto", "//components/pref_registry", @@ -50,13 +54,10 @@ component("chromeos") { "//crypto:platform", "//google_apis", "//media/base:video_facing", - "//net", "//services/network/public/cpp:cpp", - "//skia", # For components/user_manager - "//third_party/icu", + "//skia", "//third_party/protobuf:protobuf_lite", "//ui/gfx/geometry", # For accelerometer. - "//url", ] sources = [ "accelerometer/accelerometer_reader.cc", @@ -82,242 +83,6 @@ component("chromeos") { "audio/chromeos_sounds.h", "audio/cras_audio_handler.cc", "audio/cras_audio_handler.h", - "binder/buffer_reader.cc", - "binder/buffer_reader.h", - "binder/command_broker.cc", - "binder/command_broker.h", - "binder/command_stream.cc", - "binder/command_stream.h", - "binder/constants.h", - "binder/driver.cc", - "binder/driver.h", - "binder/ipc_thread.cc", - "binder/ipc_thread.h", - "binder/local_object.cc", - "binder/local_object.h", - "binder/object.h", - "binder/remote_object.cc", - "binder/remote_object.h", - "binder/service_manager_proxy.cc", - "binder/service_manager_proxy.h", - "binder/status.h", - "binder/transaction_data.h", - "binder/transaction_data_from_driver.cc", - "binder/transaction_data_from_driver.h", - "binder/transaction_data_reader.cc", - "binder/transaction_data_reader.h", - "binder/transaction_status.cc", - "binder/transaction_status.h", - "binder/util.cc", - "binder/util.h", - "binder/writable_transaction_data.cc", - "binder/writable_transaction_data.h", - "cert_loader.cc", - "cert_loader.h", - "chromeos_constants.cc", - "chromeos_constants.h", - "chromeos_export.h", - "chromeos_features.cc", - "chromeos_features.h", - "chromeos_paths.cc", - "chromeos_paths.h", - "chromeos_pref_names.cc", - "chromeos_pref_names.h", - "chromeos_switches.cc", - "chromeos_switches.h", - "cryptohome/async_method_caller.cc", - "cryptohome/async_method_caller.h", - "cryptohome/cryptohome_parameters.cc", - "cryptohome/cryptohome_parameters.h", - "cryptohome/cryptohome_util.cc", - "cryptohome/cryptohome_util.h", - "cryptohome/homedir_methods.cc", - "cryptohome/homedir_methods.h", - "cryptohome/system_salt_getter.cc", - "cryptohome/system_salt_getter.h", - "dbus/arc_appfuse_provider_client.cc", - "dbus/arc_appfuse_provider_client.h", - "dbus/arc_midis_client.cc", - "dbus/arc_midis_client.h", - "dbus/arc_obb_mounter_client.cc", - "dbus/arc_obb_mounter_client.h", - "dbus/arc_oemcrypto_client.cc", - "dbus/arc_oemcrypto_client.h", - "dbus/attestation_constants.cc", - "dbus/attestation_constants.h", - "dbus/audio_node.cc", - "dbus/audio_node.h", - "dbus/auth_policy_client.cc", - "dbus/auth_policy_client.h", - "dbus/biod/biod_client.cc", - "dbus/biod/biod_client.h", - "dbus/biod/fake_biod_client.cc", - "dbus/biod/fake_biod_client.h", - "dbus/blocking_method_caller.cc", - "dbus/blocking_method_caller.h", - "dbus/cec_service_client.cc", - "dbus/cec_service_client.h", - "dbus/cicerone_client.cc", - "dbus/cicerone_client.h", - "dbus/concierge_client.cc", - "dbus/concierge_client.h", - "dbus/cras_audio_client.cc", - "dbus/cras_audio_client.h", - "dbus/cros_disks_client.cc", - "dbus/cros_disks_client.h", - "dbus/cryptohome_client.cc", - "dbus/cryptohome_client.h", - "dbus/dbus_client_implementation_type.h", - "dbus/dbus_clients_browser.cc", - "dbus/dbus_clients_browser.h", - "dbus/dbus_clients_common.cc", - "dbus/dbus_clients_common.h", - "dbus/dbus_method_call_status.cc", - "dbus/dbus_method_call_status.h", - "dbus/dbus_switches.cc", - "dbus/dbus_switches.h", - "dbus/dbus_thread_manager.cc", - "dbus/dbus_thread_manager.h", - "dbus/debug_daemon_client.cc", - "dbus/debug_daemon_client.h", - "dbus/easy_unlock_client.cc", - "dbus/easy_unlock_client.h", - "dbus/fake_arc_appfuse_provider_client.cc", - "dbus/fake_arc_appfuse_provider_client.h", - "dbus/fake_arc_midis_client.cc", - "dbus/fake_arc_midis_client.h", - "dbus/fake_arc_obb_mounter_client.cc", - "dbus/fake_arc_obb_mounter_client.h", - "dbus/fake_arc_oemcrypto_client.cc", - "dbus/fake_arc_oemcrypto_client.h", - "dbus/fake_auth_policy_client.cc", - "dbus/fake_auth_policy_client.h", - "dbus/fake_cec_service_client.cc", - "dbus/fake_cec_service_client.h", - "dbus/fake_cicerone_client.cc", - "dbus/fake_cicerone_client.h", - "dbus/fake_concierge_client.cc", - "dbus/fake_concierge_client.h", - "dbus/fake_cras_audio_client.cc", - "dbus/fake_cras_audio_client.h", - "dbus/fake_cros_disks_client.cc", - "dbus/fake_cros_disks_client.h", - "dbus/fake_cryptohome_client.cc", - "dbus/fake_cryptohome_client.h", - "dbus/fake_debug_daemon_client.cc", - "dbus/fake_debug_daemon_client.h", - "dbus/fake_easy_unlock_client.cc", - "dbus/fake_easy_unlock_client.h", - "dbus/fake_gsm_sms_client.cc", - "dbus/fake_gsm_sms_client.h", - "dbus/fake_hammerd_client.cc", - "dbus/fake_hammerd_client.h", - "dbus/fake_image_burner_client.cc", - "dbus/fake_image_burner_client.h", - "dbus/fake_image_loader_client.cc", - "dbus/fake_image_loader_client.h", - "dbus/fake_lorgnette_manager_client.cc", - "dbus/fake_lorgnette_manager_client.h", - "dbus/fake_machine_learning_client.cc", - "dbus/fake_machine_learning_client.h", - "dbus/fake_media_analytics_client.cc", - "dbus/fake_media_analytics_client.h", - "dbus/fake_modem_messaging_client.cc", - "dbus/fake_modem_messaging_client.h", - "dbus/fake_oobe_configuration_client.cc", - "dbus/fake_oobe_configuration_client.h", - "dbus/fake_permission_broker_client.cc", - "dbus/fake_permission_broker_client.h", - "dbus/fake_power_manager_client.cc", - "dbus/fake_power_manager_client.h", - "dbus/fake_session_manager_client.cc", - "dbus/fake_session_manager_client.h", - "dbus/fake_shill_device_client.cc", - "dbus/fake_shill_device_client.h", - "dbus/fake_shill_ipconfig_client.cc", - "dbus/fake_shill_ipconfig_client.h", - "dbus/fake_shill_manager_client.cc", - "dbus/fake_shill_manager_client.h", - "dbus/fake_shill_profile_client.cc", - "dbus/fake_shill_profile_client.h", - "dbus/fake_shill_service_client.cc", - "dbus/fake_shill_service_client.h", - "dbus/fake_shill_third_party_vpn_driver_client.cc", - "dbus/fake_shill_third_party_vpn_driver_client.h", - "dbus/fake_smb_provider_client.cc", - "dbus/fake_smb_provider_client.h", - "dbus/fake_sms_client.cc", - "dbus/fake_sms_client.h", - "dbus/fake_system_clock_client.cc", - "dbus/fake_system_clock_client.h", - "dbus/fake_upstart_client.cc", - "dbus/fake_upstart_client.h", - "dbus/fake_virtual_file_provider_client.cc", - "dbus/fake_virtual_file_provider_client.h", - "dbus/gsm_sms_client.cc", - "dbus/gsm_sms_client.h", - "dbus/hammerd_client.cc", - "dbus/hammerd_client.h", - "dbus/image_burner_client.cc", - "dbus/image_burner_client.h", - "dbus/image_loader_client.cc", - "dbus/image_loader_client.h", - "dbus/lorgnette_manager_client.cc", - "dbus/lorgnette_manager_client.h", - "dbus/machine_learning_client.cc", - "dbus/machine_learning_client.h", - "dbus/media_analytics_client.cc", - "dbus/media_analytics_client.h", - "dbus/modem_messaging_client.cc", - "dbus/modem_messaging_client.h", - "dbus/oobe_configuration_client.cc", - "dbus/oobe_configuration_client.h", - "dbus/permission_broker_client.cc", - "dbus/permission_broker_client.h", - "dbus/pipe_reader.cc", - "dbus/pipe_reader.h", - "dbus/power_manager_client.cc", - "dbus/power_manager_client.h", - "dbus/power_policy_controller.cc", - "dbus/power_policy_controller.h", - "dbus/services/cros_dbus_service.cc", - "dbus/services/cros_dbus_service.h", - "dbus/session_manager_client.cc", - "dbus/session_manager_client.h", - "dbus/shill_client_helper.cc", - "dbus/shill_client_helper.h", - "dbus/shill_device_client.cc", - "dbus/shill_device_client.h", - "dbus/shill_ipconfig_client.cc", - "dbus/shill_ipconfig_client.h", - "dbus/shill_manager_client.cc", - "dbus/shill_manager_client.h", - "dbus/shill_profile_client.cc", - "dbus/shill_profile_client.h", - "dbus/shill_service_client.cc", - "dbus/shill_service_client.h", - "dbus/shill_third_party_vpn_driver_client.cc", - "dbus/shill_third_party_vpn_driver_client.h", - "dbus/smb_provider_client.cc", - "dbus/smb_provider_client.h", - "dbus/sms_client.cc", - "dbus/sms_client.h", - "dbus/system_clock_client.cc", - "dbus/system_clock_client.h", - "dbus/update_engine_client.cc", - "dbus/update_engine_client.h", - "dbus/upstart_client.cc", - "dbus/upstart_client.h", - "dbus/util/account_identifier_operators.cc", - "dbus/util/account_identifier_operators.h", - "dbus/util/tpm_util.cc", - "dbus/util/tpm_util.h", - "dbus/util/version_loader.cc", - "dbus/util/version_loader.h", - "dbus/virtual_file_provider_client.cc", - "dbus/virtual_file_provider_client.h", - "dbus/volume_state.cc", - "dbus/volume_state.h", "disks/disk.cc", "disks/disk.h", "disks/disk_mount_manager.cc", @@ -334,38 +99,6 @@ component("chromeos") { "geolocation/simple_geolocation_request_test_monitor.h", "hugepage_text/hugepage_text.cc", "hugepage_text/hugepage_text.h", - "login/auth/auth_attempt_state.cc", - "login/auth/auth_attempt_state.h", - "login/auth/auth_attempt_state_resolver.cc", - "login/auth/auth_attempt_state_resolver.h", - "login/auth/auth_status_consumer.cc", - "login/auth/auth_status_consumer.h", - "login/auth/authenticator.cc", - "login/auth/authenticator.h", - "login/auth/authpolicy_login_helper.cc", - "login/auth/authpolicy_login_helper.h", - "login/auth/challenge_response_key.cc", - "login/auth/challenge_response_key.h", - "login/auth/cryptohome_authenticator.cc", - "login/auth/cryptohome_authenticator.h", - "login/auth/extended_authenticator.cc", - "login/auth/extended_authenticator.h", - "login/auth/extended_authenticator_impl.cc", - "login/auth/extended_authenticator_impl.h", - "login/auth/key.cc", - "login/auth/key.h", - "login/auth/login_performer.cc", - "login/auth/login_performer.h", - "login/auth/stub_authenticator.cc", - "login/auth/stub_authenticator.h", - "login/auth/test_attempt_state.cc", - "login/auth/test_attempt_state.h", - "login/auth/user_context.cc", - "login/auth/user_context.h", - "login/login_state.cc", - "login/login_state.h", - "login_event_recorder.cc", - "login_event_recorder.h", "network/auto_connect_handler.cc", "network/auto_connect_handler.h", "network/certificate_helper.cc", @@ -396,6 +129,8 @@ component("chromeos") { "network/managed_state.h", "network/network_activation_handler.cc", "network/network_activation_handler.h", + "network/network_cert_loader.cc", + "network/network_cert_loader.h", "network/network_cert_migrator.cc", "network/network_cert_migrator.h", "network/network_certificate_handler.cc", @@ -493,6 +228,12 @@ component("chromeos") { "network/shill_property_util.h", "network/tether_constants.cc", "network/tether_constants.h", + "policy/weekly_time/time_utils.cc", + "policy/weekly_time/time_utils.h", + "policy/weekly_time/weekly_time.cc", + "policy/weekly_time/weekly_time.h", + "policy/weekly_time/weekly_time_interval.cc", + "policy/weekly_time/weekly_time_interval.h", "policy_certificate_provider.h", "printing/ppd_cache.cc", "printing/ppd_cache.h", @@ -512,14 +253,6 @@ component("chromeos") { "process_proxy/process_proxy.h", "process_proxy/process_proxy_registry.cc", "process_proxy/process_proxy_registry.h", - "settings/cros_settings_names.cc", - "settings/cros_settings_names.h", - "settings/cros_settings_provider.cc", - "settings/cros_settings_provider.h", - "settings/timezone_settings.cc", - "settings/timezone_settings.h", - "settings/timezone_settings_helper.cc", - "settings/timezone_settings_helper.h", "system/cpu_temperature_reader.cc", "system/cpu_temperature_reader.h", "system/devicemode.cc", @@ -557,6 +290,50 @@ component("chromeos") { } } +source_set("chromeos_export") { + deps = [ + "//base", + ] + sources = [ + "chromeos_export.h", + ] +} + +source_set("chromeos_constants") { + deps = [ + ":chromeos_export", + "//base", + "//base:i18n", + "//chromeos/dbus:dbus_switches", + "//third_party/icu", + ] + sources = [ + "chromeos_constants.cc", + "chromeos_constants.h", + "chromeos_features.cc", + "chromeos_features.h", + "chromeos_paths.cc", + "chromeos_paths.h", + "chromeos_pref_names.cc", + "chromeos_pref_names.h", + "chromeos_switches.cc", + "chromeos_switches.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("login_event_recorder") { + deps = [ + ":chromeos_export", + "//base", + ] + sources = [ + "login_event_recorder.cc", + "login_event_recorder.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + # This must be a static library instead of a source set because some of the # files pull in things with dependencies that aren't linked in all cases. # @@ -564,18 +341,23 @@ component("chromeos") { # can be converted to a source set. static_library("test_support") { testonly = true - configs += [ "//build/config/linux/dbus" ] + public_deps = [ + ":test_support_source_set", + ] +} + +source_set("test_support_source_set") { + testonly = true public_deps = [ ":attestation_proto", ":biod_proto", ":chromeos", ":cryptohome_proto", ":power_manager_proto", + "//chromeos/dbus:test_support", ] deps = [ - ":test_support_without_gmock", "//components/account_id", - "//dbus:test_support", "//google_apis", "//net:test_support", "//services/network:test_support", @@ -591,10 +373,6 @@ static_library("test_support") { "cryptohome/mock_async_method_caller.h", "cryptohome/mock_homedir_methods.cc", "cryptohome/mock_homedir_methods.h", - "dbus/biod/test_utils.cc", - "dbus/biod/test_utils.h", - "dbus/services/service_provider_test_helper.cc", - "dbus/services/service_provider_test_helper.h", "disks/mock_disk_mount_manager.cc", "disks/mock_disk_mount_manager.h", "login/auth/fake_extended_authenticator.cc", @@ -626,29 +404,8 @@ static_library("test_support") { static_library("test_support_without_gmock") { testonly = true - configs += [ "//build/config/linux/dbus" ] - deps = [ - ":attestation_proto", - ":biod_proto", - ":chromeos", - ":cryptohome_proto", - ":login_manager_proto", - ":power_manager_proto", - "//components/policy/proto", - "//crypto", - "//url", - ] - sources = [ - "dbus/fake_cros_disks_client.cc", - "dbus/fake_cros_disks_client.h", - - # TODO(crbug.com/799071) remove fake_session_manager_client and fix build rules. - "dbus/fake_session_manager_client.cc", - "dbus/fake_session_manager_client.h", - "dbus/fake_shill_manager_client.cc", - "dbus/fake_shill_manager_client.h", - "dbus/fake_update_engine_client.cc", - "dbus/fake_update_engine_client.h", + public_deps = [ + "//chromeos/dbus", ] } @@ -662,13 +419,20 @@ test("chromeos_unittests") { ":authpolicy_proto", ":biod_proto", ":cryptohome_proto", + ":oobe_config_proto", ":power_manager_proto", ":test_support", ":test_support_without_gmock", "//base/test:test_support", + "//chromeos/cryptohome:unit_tests", + "//chromeos/dbus:unit_tests", + "//chromeos/login:unit_tests", "//chromeos/services:unit_tests", + "//chromeos/settings:unit_tests", "//components/account_id", "//components/onc", + "//components/policy:generated", + "//components/policy/proto", "//components/prefs:test_support", "//components/proxy_config", "//crypto", @@ -692,42 +456,10 @@ test("chromeos_unittests") { "attestation/attestation_flow_unittest.cc", "audio/audio_devices_pref_handler_impl_unittest.cc", "audio/cras_audio_handler_unittest.cc", - "cert_loader_unittest.cc", - "cryptohome/cryptohome_util_unittest.cc", - "cryptohome/system_salt_getter_unittest.cc", - "dbus/biod/biod_client_unittest.cc", - "dbus/biod/fake_biod_client_unittest.cc", - "dbus/blocking_method_caller_unittest.cc", - "dbus/cec_service_client_unittest.cc", - "dbus/cras_audio_client_unittest.cc", - "dbus/cros_disks_client_unittest.cc", - "dbus/dbus_thread_manager_unittest.cc", - "dbus/fake_auth_policy_client_unittest.cc", - "dbus/fake_cryptohome_client_unittest.cc", - "dbus/fake_easy_unlock_client_unittest.cc", - "dbus/fake_power_manager_client_unittest.cc", - "dbus/gsm_sms_client_unittest.cc", - "dbus/modem_messaging_client_unittest.cc", - "dbus/pipe_reader_unittest.cc", - "dbus/power_manager_client_unittest.cc", - "dbus/power_policy_controller_unittest.cc", - "dbus/services/cros_dbus_service_unittest.cc", - "dbus/shill_client_unittest_base.cc", - "dbus/shill_client_unittest_base.h", - "dbus/shill_device_client_unittest.cc", - "dbus/shill_ipconfig_client_unittest.cc", - "dbus/shill_manager_client_unittest.cc", - "dbus/shill_profile_client_unittest.cc", - "dbus/shill_service_client_unittest.cc", - "dbus/shill_third_party_vpn_driver_client_unittest.cc", - "dbus/util/version_loader_unittest.cc", "disks/disk_mount_manager_unittest.cc", "disks/disk_unittest.cc", "disks/suspend_unmount_manager_unittest.cc", "geolocation/simple_geolocation_unittest.cc", - "login/auth/authpolicy_login_helper_unittest.cc", - "login/auth/key_unittest.cc", - "login/login_state_unittest.cc", "network/auto_connect_handler_unittest.cc", "network/certificate_helper_unittest.cc", "network/client_cert_resolver_unittest.cc", @@ -735,6 +467,7 @@ test("chromeos_unittests") { "network/geolocation_handler_unittest.cc", "network/host_resolver_impl_chromeos_unittest.cc", "network/managed_network_configuration_handler_unittest.cc", + "network/network_cert_loader_unittest.cc", "network/network_cert_migrator_unittest.cc", "network/network_change_notifier_chromeos_unittest.cc", "network/network_configuration_handler_unittest.cc", @@ -757,6 +490,9 @@ test("chromeos_unittests") { "network/prohibited_technologies_handler_unittest.cc", "network/proxy/proxy_config_service_impl_unittest.cc", "network/shill_property_handler_unittest.cc", + "policy/weekly_time/time_utils_unittest.cc", + "policy/weekly_time/weekly_time_interval_unittest.cc", + "policy/weekly_time/weekly_time_unittest.cc", "printing/ppd_cache_unittest.cc", "printing/ppd_line_reader_unittest.cc", "printing/ppd_provider_unittest.cc", @@ -765,7 +501,6 @@ test("chromeos_unittests") { "process_proxy/process_output_watcher_unittest.cc", "process_proxy/process_proxy_unittest.cc", "run_all_unittests.cc", - "settings/timezone_settings_unittest.cc", "system/cpu_temperature_reader_unittest.cc", "system/factory_ping_embargo_check_unittest.cc", "system/name_value_pairs_parser_unittest.cc", @@ -773,29 +508,17 @@ test("chromeos_unittests") { "tools/variable_expander_unittest.cc", "tpm/tpm_token_info_getter_unittest.cc", ] - if (use_binder) { - if (current_cpu == "arm" || current_cpu == "x86") { - defines += [ "BINDER_IPC_32BIT" ] - } - sources += [ - "binder/buffer_reader_unittest.cc", - "binder/command_broker_unittest.cc", - "binder/command_stream_unittest.cc", - "binder/driver_unittest.cc", - "binder/end_to_end_unittest.cc", - "binder/service_manager_proxy_unittest.cc", - "binder/test_service.cc", - "binder/test_service.h", - "binder/transaction_data_read_write_unittest.cc", - ] - } data = [ "test/data/", ] } -if (cros_board != "") { +# The following definitions only apply when building for a CrOS board (ie: not +# linux-chromeos). See the following for reference: +# https://chromium.googlesource.com/chromium/src/+/master/docs/chromeos_build_instructions.md +# https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md +if (is_chromeos_chrome) { generate_vm_runner_script("cros_vm_launcher") { generated_script = "$root_build_dir/bin/launch_cros_vm" @@ -807,14 +530,28 @@ if (cros_board != "") { # The sanity test's actual binary is baked into the vm image. All we need to # do is build the test wrapper and build our own browser to push to the VM # before testing it. - generate_vm_runner_script("cros_vm_sanity_test_wrapper") { - test_exe = "$root_out_dir/cros_vm_sanity_test" + generate_vm_runner_script("cros_vm_sanity_test") { + testonly = true + test_exe = "cros_vm_sanity_test" generated_script = "$root_build_dir/bin/run_cros_vm_sanity_test" + runtime_deps_file = "$root_out_dir/cros_vm_sanity_test.runtime_deps" + + data_deps = [ + ":cros_chrome_deploy", + "//:chromiumos_preflight", # Builds the browser. + ] + } - # The sanity test needs to strip down Chrome and its deps to fit it into - # the VM. It does so by using binutils in the toolchain. So signal that we - # need the toolchain in the data. - need_toolchain = true + tast_test("chrome_login_tast_tests") { + tast_tests = [ + "ui.ChromeLogin", + "ui.ChromeCrashLoggedIn", + "ui.ChromeCrashNotLoggedIn", + ] + } + + tast_test("chrome_all_tast_tests") { + tast_conditional = "(!informational && !disabled && (\"dep:chrome\" || \"dep:chrome_login\"))" } group("cros_chrome_deploy") { @@ -836,16 +573,6 @@ if (cros_board != "") { "$root_out_dir/resources/chromeos/", ] } - - group("cros_vm_sanity_test") { - testonly = true - write_runtime_deps = "$root_out_dir/cros_vm_sanity_test.runtime_deps" - data_deps = [ - ":cros_chrome_deploy", - "//:chromiumos_preflight", # Builds the browser. - ":cros_vm_sanity_test_wrapper", # Builds the test wrapper. - ] - } } fuzzer_test("variable_expander_fuzzer") { @@ -875,6 +602,14 @@ proto_library("power_manager_proto") { proto_out_dir = "chromeos/dbus/power_manager" } +proto_library("metrics_event_proto") { + sources = [ + "//third_party/cros_system_api/dbus/metrics_event/metrics_event.proto", + ] + + proto_out_dir = "chromeos/dbus/metrics_event" +} + proto_library("attestation_proto") { sources = [ "dbus/proto/attestation.proto", @@ -950,6 +685,22 @@ proto_library("media_perception_proto") { proto_out_dir = "chromeos/dbus/media_perception" } +proto_library("oobe_config_proto") { + sources = [ + "//third_party/cros_system_api/dbus/oobe_config/oobe_config.proto", + ] + + proto_out_dir = "chromeos/dbus/oobe_config" +} + +proto_library("seneschal_proto") { + sources = [ + "//third_party/cros_system_api/dbus/seneschal/seneschal_service.proto", + ] + + proto_out_dir = "chromeos/dbus/seneschal" +} + proto_library("smbprovider_proto") { sources = [ "//third_party/cros_system_api/dbus/smbprovider/directory_entry.proto", diff --git a/chromium/chromeos/assistant/assistant.gni b/chromium/chromeos/assistant/assistant.gni index 3aac971f253..21b216f8ba9 100644 --- a/chromium/chromeos/assistant/assistant.gni +++ b/chromium/chromeos/assistant/assistant.gni @@ -1,13 +1,13 @@ +import("//build/config/chrome_build.gni") + declare_args() { # Enable assistant features. Assistant related code is compiled only when # true. The default assistant implementation is a stub. enable_cros_assistant = is_chromeos +} +declare_args() { # Enable assistant implementation based on libassistant. This requires # enable_cros_assistant also enabled. - enable_cros_libassistant = false - - # Enable building libassistant.so shared library from local checkout. This is - # for development purposes only. - enable_cros_libassistant_so = false + enable_cros_libassistant = enable_cros_assistant && is_chrome_branded } diff --git a/chromium/chromeos/components/drivefs/mojom/drivefs.mojom b/chromium/chromeos/components/drivefs/mojom/drivefs.mojom index 5eb0461992b..712e1fdde47 100644 --- a/chromium/chromeos/components/drivefs/mojom/drivefs.mojom +++ b/chromium/chromeos/components/drivefs/mojom/drivefs.mojom @@ -20,10 +20,8 @@ interface DriveFsBootstrap { // Implemented by DriveFS, used from Chrome. interface DriveFs { - // Returns the metadata for |path|. Thumbnail requests may require requesting - // a thumbnail from the server so thumbnails are only populated for requests - // where |want_thumbnail| is true. - GetMetadata(mojo_base.mojom.FilePath path, bool want_thumbnail) => ( + // Returns the metadata for |path|. + GetMetadata(mojo_base.mojom.FilePath path) => ( FileError error, FileMetadata? metadata); // Sets the file at |path| to pinned or unpinned depending on the value of @@ -36,6 +34,22 @@ interface DriveFs { // Reset DriveFS cache. ResetCache() => (FileError error); + + // Returns a PNG containing a thumbnail for |path|. If |crop_to_square|, a + // 360x360 thumbnail, cropped to fit a square is returned; otherwise a + // thumbnail up to 500x500, maintaining aspect ration, is returned. If |path| + // does not exist or does not have a thumbnail, |thumbnail| will be null. + GetThumbnail(mojo_base.mojom.FilePath path, bool crop_to_square) => ( + array<uint8>? thumbnail); + + // Copy a file at |source| to |target|. If |source| refers to a directory, + // kNotAFile is returned. |target| is the path to the desired output of the + // copy; its parent must be an existing directory. + CopyFile(mojo_base.mojom.FilePath source, mojo_base.mojom.FilePath target) => + (FileError error); + + // Start a search query with given parameters. + StartSearchQuery(SearchQuery& query, QueryParameters query_params); }; // Implemented by Chrome, used from DriveFS. @@ -61,6 +75,9 @@ interface DriveFsDelegate { // Invoked when server-side file changes are received. OnFilesChanged(array<FileChange> changes); + + // Invoked when a supported error occurs. + OnError(DriveError error); }; struct DriveFsConfiguration { @@ -103,6 +120,18 @@ enum FileError { kServiceUnavailable = -18, }; +// Errors received from DriveFS to be forwarded to the file manager UI. +struct DriveError { + [Extensible] enum Type { + kCantUploadStorageFull, + }; + + Type type; + + // The path to the file where an error was encountered, if there was one. + mojo_base.mojom.FilePath path; +}; + struct FileMetadata { enum Type { // A regular file. @@ -129,7 +158,7 @@ struct FileMetadata { string download_url; mojo_base.mojom.Time modification_time; - mojo_base.mojom.Time modification_by_me_time; + mojo_base.mojom.Time last_viewed_by_me_time; bool available_offline; bool dirty; @@ -140,9 +169,8 @@ struct FileMetadata { // May be present if the file is an image. ImageMetadata? image_metadata; - // The thumbnail as a PNG. It is only set if |want_thumbnail| is true in the - // request and the file has a thumbnail available. - array<uint8>? thumbnail; + // Never set. + array<uint8>? deprecated_thumbnail; Capabilities capabilities; }; @@ -205,3 +233,65 @@ struct FileChange { Type type; }; + +// Definition of the search request sent to DriveFS. +struct QueryParameters { + // Where this request should go to. + enum QuerySource { + kLocalOnly = 0, + kCloudOnly = 1, + }; + + // Which field should be used for sorting the results. + [Extensible] + enum SortField { + kNone = 0, + kLastModified = 1, + kLastViewedByMe = 2, + kFileSize = 3, + }; + + enum SortDirection { + kAscending = 0, + kDescending = 1, + }; + + // How many results to fetch per page. + int32 page_size = 100; + + // Which source should be queried. + QuerySource query_source = kCloudOnly; + + // Search for documents whose titles matches this string. + string? title; + + // Full-text search by content. Works only with |kCloudOnly|. + string? text_content; + + // Search for documents of this type. + string? mime_type; + + // Results must be only from shared with me documents. + bool shared_with_me = false; + + // Results must be only from available localy on the device. Works only + // with |kLocalOnly|. + bool available_offline = false; + + // How to sort the returned results. + SortField sort_field = kNone; + SortDirection sort_direction = kAscending; +}; + +// Represents a search request in progress. +interface SearchQuery { + // Performs query and if successful returns next portion of results. If there + // are no more results to fetch then |results| is empty array. + GetNextPage() => (FileError error, array<QueryItem>? results); +}; + +// Single entry in search response. +struct QueryItem { + FileMetadata metadata; + mojo_base.mojom.FilePath path; +}; diff --git a/chromium/chromeos/components/proximity_auth/BUILD.gn b/chromium/chromeos/components/proximity_auth/BUILD.gn index 17c9c5fd93b..e8342832432 100644 --- a/chromium/chromeos/components/proximity_auth/BUILD.gn +++ b/chromium/chromeos/components/proximity_auth/BUILD.gn @@ -125,6 +125,7 @@ source_set("unit_tests") { # TODO(hansberry): Remove this dependency once https://crbug.com/870123 is # fixed. "//chromeos/services/multidevice_setup/public/cpp:prefs", + "//chromeos/services/multidevice_setup/public/cpp:test_support", "//chromeos/services/secure_channel/public/cpp/client:test_support", "//components/cryptauth:test_support", "//components/prefs:test_support", diff --git a/chromium/chromeos/cryptohome/BUILD.gn b/chromium/chromeos/cryptohome/BUILD.gn new file mode 100644 index 00000000000..2597786383c --- /dev/null +++ b/chromium/chromeos/cryptohome/BUILD.gn @@ -0,0 +1,53 @@ +# Copyright 2018 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. + +import("//build/config/chromeos/rules.gni") +import("//testing/test.gni") +import("//third_party/protobuf/proto_library.gni") + +assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos") + +source_set("cryptohome") { + deps = [ + "//base", + "//chromeos:chromeos_export", + "//chromeos:cryptohome_proto", + "//chromeos/dbus", + "//chromeos/login:challenge_response_key", + "//components/account_id", + "//components/device_event_log", + "//components/user_manager", + ] + sources = [ + "async_method_caller.cc", + "async_method_caller.h", + "cryptohome_parameters.cc", + "cryptohome_parameters.h", + "cryptohome_util.cc", + "cryptohome_util.h", + "homedir_methods.cc", + "homedir_methods.h", + "system_salt_getter.cc", + "system_salt_getter.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("unit_tests") { + testonly = true + deps = [ + ":cryptohome", + "//base", + "//base/test:test_support", + "//chromeos:cryptohome_proto", + "//chromeos/dbus", + "//chromeos/login", + "//chromeos/login:challenge_response_key", + "//testing/gtest:gtest", + ] + sources = [ + "cryptohome_util_unittest.cc", + "system_salt_getter_unittest.cc", + ] +} diff --git a/chromium/chromeos/dbus/BUILD.gn b/chromium/chromeos/dbus/BUILD.gn new file mode 100644 index 00000000000..2a3717c7470 --- /dev/null +++ b/chromium/chromeos/dbus/BUILD.gn @@ -0,0 +1,316 @@ +# Copyright 2018 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. + +import("//build/config/chromeos/rules.gni") +import("//testing/test.gni") +import("//third_party/protobuf/proto_library.gni") + +assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos") + +source_set("dbus") { + public_deps = [ + ":dbus_switches", + ] + deps = [ + "//base", + "//base:i18n", + "//chromeos:attestation_proto", + "//chromeos:authpolicy_proto", + "//chromeos:biod_proto", + "//chromeos:chromeos_constants", + "//chromeos:chromeos_export", + "//chromeos:cicerone_proto", + "//chromeos:concierge_proto", + "//chromeos:cryptohome_proto", + "//chromeos:login_manager_proto", + "//chromeos:media_perception_proto", + "//chromeos:oobe_config_proto", + "//chromeos:power_manager_proto", + "//chromeos:seneschal_proto", + "//chromeos:smbprovider_proto", + "//components/account_id", + "//components/device_event_log", + "//components/policy:cloud_policy_proto_generated_compile", + "//components/policy/proto", + "//dbus", + "//net", + "//skia", + "//third_party/icu", + "//third_party/protobuf:protobuf_lite", + "//url", + ] + sources = [ + "arc_appfuse_provider_client.cc", + "arc_appfuse_provider_client.h", + "arc_midis_client.cc", + "arc_midis_client.h", + "arc_obb_mounter_client.cc", + "arc_obb_mounter_client.h", + "arc_oemcrypto_client.cc", + "arc_oemcrypto_client.h", + "attestation_constants.cc", + "attestation_constants.h", + "audio_node.cc", + "audio_node.h", + "auth_policy_client.cc", + "auth_policy_client.h", + "biod/biod_client.cc", + "biod/biod_client.h", + "biod/fake_biod_client.cc", + "biod/fake_biod_client.h", + "blocking_method_caller.cc", + "blocking_method_caller.h", + "cec_service_client.cc", + "cec_service_client.h", + "cicerone_client.cc", + "cicerone_client.h", + "concierge_client.cc", + "concierge_client.h", + "cras_audio_client.cc", + "cras_audio_client.h", + "cros_disks_client.cc", + "cros_disks_client.h", + "cryptohome_client.cc", + "cryptohome_client.h", + "dbus_client_implementation_type.h", + "dbus_clients_browser.cc", + "dbus_clients_browser.h", + "dbus_clients_common.cc", + "dbus_clients_common.h", + "dbus_method_call_status.cc", + "dbus_method_call_status.h", + "dbus_thread_manager.cc", + "dbus_thread_manager.h", + "debug_daemon_client.cc", + "debug_daemon_client.h", + "easy_unlock_client.cc", + "easy_unlock_client.h", + "fake_arc_appfuse_provider_client.cc", + "fake_arc_appfuse_provider_client.h", + "fake_arc_midis_client.cc", + "fake_arc_midis_client.h", + "fake_arc_obb_mounter_client.cc", + "fake_arc_obb_mounter_client.h", + "fake_arc_oemcrypto_client.cc", + "fake_arc_oemcrypto_client.h", + "fake_auth_policy_client.cc", + "fake_auth_policy_client.h", + "fake_cec_service_client.cc", + "fake_cec_service_client.h", + "fake_cicerone_client.cc", + "fake_cicerone_client.h", + "fake_concierge_client.cc", + "fake_concierge_client.h", + "fake_cras_audio_client.cc", + "fake_cras_audio_client.h", + "fake_cros_disks_client.cc", + "fake_cros_disks_client.h", + "fake_cryptohome_client.cc", + "fake_cryptohome_client.h", + "fake_debug_daemon_client.cc", + "fake_debug_daemon_client.h", + "fake_easy_unlock_client.cc", + "fake_easy_unlock_client.h", + "fake_gsm_sms_client.cc", + "fake_gsm_sms_client.h", + "fake_hammerd_client.cc", + "fake_hammerd_client.h", + "fake_image_burner_client.cc", + "fake_image_burner_client.h", + "fake_image_loader_client.cc", + "fake_image_loader_client.h", + "fake_lorgnette_manager_client.cc", + "fake_lorgnette_manager_client.h", + "fake_machine_learning_client.cc", + "fake_machine_learning_client.h", + "fake_media_analytics_client.cc", + "fake_media_analytics_client.h", + "fake_modem_messaging_client.cc", + "fake_modem_messaging_client.h", + "fake_oobe_configuration_client.cc", + "fake_oobe_configuration_client.h", + "fake_permission_broker_client.cc", + "fake_permission_broker_client.h", + "fake_power_manager_client.cc", + "fake_power_manager_client.h", + "fake_seneschal_client.cc", + "fake_seneschal_client.h", + "fake_session_manager_client.cc", + "fake_session_manager_client.h", + "fake_shill_device_client.cc", + "fake_shill_device_client.h", + "fake_shill_ipconfig_client.cc", + "fake_shill_ipconfig_client.h", + "fake_shill_manager_client.cc", + "fake_shill_manager_client.h", + "fake_shill_profile_client.cc", + "fake_shill_profile_client.h", + "fake_shill_service_client.cc", + "fake_shill_service_client.h", + "fake_shill_third_party_vpn_driver_client.cc", + "fake_shill_third_party_vpn_driver_client.h", + "fake_smb_provider_client.cc", + "fake_smb_provider_client.h", + "fake_sms_client.cc", + "fake_sms_client.h", + "fake_system_clock_client.cc", + "fake_system_clock_client.h", + "fake_update_engine_client.cc", + "fake_update_engine_client.h", + "fake_upstart_client.cc", + "fake_upstart_client.h", + "fake_virtual_file_provider_client.cc", + "fake_virtual_file_provider_client.h", + "gsm_sms_client.cc", + "gsm_sms_client.h", + "hammerd_client.cc", + "hammerd_client.h", + "image_burner_client.cc", + "image_burner_client.h", + "image_loader_client.cc", + "image_loader_client.h", + "lorgnette_manager_client.cc", + "lorgnette_manager_client.h", + "machine_learning_client.cc", + "machine_learning_client.h", + "media_analytics_client.cc", + "media_analytics_client.h", + "modem_messaging_client.cc", + "modem_messaging_client.h", + "oobe_configuration_client.cc", + "oobe_configuration_client.h", + "permission_broker_client.cc", + "permission_broker_client.h", + "pipe_reader.cc", + "pipe_reader.h", + "power_manager_client.cc", + "power_manager_client.h", + "power_policy_controller.cc", + "power_policy_controller.h", + "seneschal_client.cc", + "seneschal_client.h", + "services/cros_dbus_service.cc", + "services/cros_dbus_service.h", + "session_manager_client.cc", + "session_manager_client.h", + "shill_client_helper.cc", + "shill_client_helper.h", + "shill_device_client.cc", + "shill_device_client.h", + "shill_ipconfig_client.cc", + "shill_ipconfig_client.h", + "shill_manager_client.cc", + "shill_manager_client.h", + "shill_profile_client.cc", + "shill_profile_client.h", + "shill_service_client.cc", + "shill_service_client.h", + "shill_third_party_vpn_driver_client.cc", + "shill_third_party_vpn_driver_client.h", + "smb_provider_client.cc", + "smb_provider_client.h", + "sms_client.cc", + "sms_client.h", + "system_clock_client.cc", + "system_clock_client.h", + "update_engine_client.cc", + "update_engine_client.h", + "upstart_client.cc", + "upstart_client.h", + "util/account_identifier_operators.cc", + "util/account_identifier_operators.h", + "util/tpm_util.cc", + "util/tpm_util.h", + "util/version_loader.cc", + "util/version_loader.h", + "virtual_file_provider_client.cc", + "virtual_file_provider_client.h", + "volume_state.cc", + "volume_state.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("dbus_switches") { + deps = [ + "//base", + "//chromeos:chromeos_export", + ] + sources = [ + "dbus_switches.cc", + "dbus_switches.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("test_support") { + testonly = true + configs += [ "//build/config/linux/dbus" ] + deps = [ + ":dbus", + "//base", + "//chromeos:biod_proto", + "//dbus", + "//dbus:test_support", + "//testing/gmock", + "//testing/gtest", + ] + sources = [ + "biod/test_utils.cc", + "biod/test_utils.h", + "services/service_provider_test_helper.cc", + "services/service_provider_test_helper.h", + ] +} + +source_set("unit_tests") { + configs += [ "//build/config/linux/dbus" ] + testonly = true + deps = [ + ":dbus", + "//base", + "//base:i18n", + "//base/test:test_support", + "//chromeos:biod_proto", + "//chromeos:chromeos_constants", + "//chromeos:oobe_config_proto", + "//chromeos:test_support_source_set", + "//components/account_id", + "//dbus", + "//dbus:test_support", + "//testing/gmock", + "//testing/gtest", + "//third_party/icu", + ] + sources = [ + "biod/biod_client_unittest.cc", + "biod/fake_biod_client_unittest.cc", + "blocking_method_caller_unittest.cc", + "cec_service_client_unittest.cc", + "cras_audio_client_unittest.cc", + "cros_disks_client_unittest.cc", + "dbus_thread_manager_unittest.cc", + "fake_auth_policy_client_unittest.cc", + "fake_cryptohome_client_unittest.cc", + "fake_easy_unlock_client_unittest.cc", + "fake_power_manager_client_unittest.cc", + "gsm_sms_client_unittest.cc", + "modem_messaging_client_unittest.cc", + "oobe_configuration_client_unittest.cc", + "pipe_reader_unittest.cc", + "power_manager_client_unittest.cc", + "power_policy_controller_unittest.cc", + "services/cros_dbus_service_unittest.cc", + "shill_client_unittest_base.cc", + "shill_client_unittest_base.h", + "shill_device_client_unittest.cc", + "shill_ipconfig_client_unittest.cc", + "shill_manager_client_unittest.cc", + "shill_profile_client_unittest.cc", + "shill_service_client_unittest.cc", + "shill_third_party_vpn_driver_client_unittest.cc", + "update_engine_client_unittest.cc", + "util/version_loader_unittest.cc", + ] +} diff --git a/chromium/chromeos/login/BUILD.gn b/chromium/chromeos/login/BUILD.gn new file mode 100644 index 00000000000..010211b547e --- /dev/null +++ b/chromium/chromeos/login/BUILD.gn @@ -0,0 +1,103 @@ +# Copyright 2018 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. + +import("//build/config/chromeos/rules.gni") +import("//testing/test.gni") +import("//third_party/protobuf/proto_library.gni") + +assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos") + +source_set("login") { + public_deps = [ + ":challenge_response_key", + ] + deps = [ + "//base", + "//base:i18n", + "//chromeos:authpolicy_proto", + "//chromeos:chromeos_constants", + "//chromeos:chromeos_export", + "//chromeos:cryptohome_proto", + "//chromeos:login_event_recorder", + "//chromeos/cryptohome", + "//chromeos/dbus", + "//chromeos/settings:cros_settings_names", + "//components/account_id", + "//components/device_event_log", + "//components/password_manager/core/browser:password_hash_data", + "//components/prefs", + "//components/user_manager", + "//dbus", + "//google_apis", + "//net", + "//skia", + "//third_party/icu", + "//third_party/protobuf:protobuf_lite", + "//url", + ] + sources = [ + "auth/auth_attempt_state.cc", + "auth/auth_attempt_state.h", + "auth/auth_attempt_state_resolver.cc", + "auth/auth_attempt_state_resolver.h", + "auth/auth_status_consumer.cc", + "auth/auth_status_consumer.h", + "auth/authenticator.cc", + "auth/authenticator.h", + "auth/authpolicy_login_helper.cc", + "auth/authpolicy_login_helper.h", + "auth/cryptohome_authenticator.cc", + "auth/cryptohome_authenticator.h", + "auth/extended_authenticator.cc", + "auth/extended_authenticator.h", + "auth/extended_authenticator_impl.cc", + "auth/extended_authenticator_impl.h", + "auth/key.cc", + "auth/key.h", + "auth/login_performer.cc", + "auth/login_performer.h", + "auth/stub_authenticator.cc", + "auth/stub_authenticator.h", + "auth/test_attempt_state.cc", + "auth/test_attempt_state.h", + "auth/user_context.cc", + "auth/user_context.h", + "login_state.cc", + "login_state.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("challenge_response_key") { + deps = [ + "//base", + "//chromeos:chromeos_export", + ] + sources = [ + "auth/challenge_response_key.cc", + "auth/challenge_response_key.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("unit_tests") { + configs += [ "//build/config/linux/dbus" ] + testonly = true + deps = [ + ":login", + "//base", + "//base:i18n", + "//chromeos:authpolicy_proto", + "//chromeos:chromeos_constants", + "//chromeos/dbus", + "//testing/gmock", + "//testing/gtest", + "//third_party/icu", + ] + sources = [ + "auth/authpolicy_login_helper_unittest.cc", + "auth/key_unittest.cc", + "login_state_unittest.cc", + ] +} diff --git a/chromium/chromeos/resources/BUILD.gn b/chromium/chromeos/resources/BUILD.gn index c9a35fe846b..3ae0262547c 100644 --- a/chromium/chromeos/resources/BUILD.gn +++ b/chromium/chromeos/resources/BUILD.gn @@ -14,6 +14,8 @@ grit("resources") { outputs = [ "grit/chromeos_resources.h", + "grit/chromeos_resources_map.cc", + "grit/chromeos_resources_map.h", "chromeos_resources.pak", ] output_dir = "$root_gen_dir/chromeos" @@ -28,6 +30,5 @@ grit("resources") { deps = [ "//chromeos/services/device_sync/public/mojom:mojom_js", "//chromeos/services/multidevice_setup/public/mojom:mojom_js", - "//mojo/public/mojom/base:base_js", ] } diff --git a/chromium/chromeos/services/BUILD.gn b/chromium/chromeos/services/BUILD.gn index b9cd9776ede..3ed8fc8e746 100644 --- a/chromium/chromeos/services/BUILD.gn +++ b/chromium/chromeos/services/BUILD.gn @@ -22,6 +22,7 @@ source_set("unit_tests") { testonly = true deps = [ "//chromeos/services/device_sync:unit_tests", + "//chromeos/services/ime:unit_tests", "//chromeos/services/machine_learning/public/cpp:unit_tests", "//chromeos/services/multidevice_setup:unit_tests", "//chromeos/services/secure_channel:unit_tests", @@ -37,7 +38,7 @@ source_set("unit_tests") { # target below. service_test("chromeos_services_unittests") { deps = [ - "//chromeos/services/ime:unit_tests", + "//chromeos/services/ime:services_unittests", ] if (enable_cros_assistant) { diff --git a/chromium/chromeos/services/assistant/BUILD.gn b/chromium/chromeos/services/assistant/BUILD.gn index 75af4beddd1..01a1f89ff90 100644 --- a/chromium/chromeos/services/assistant/BUILD.gn +++ b/chromium/chromeos/services/assistant/BUILD.gn @@ -68,9 +68,13 @@ source_set("lib") { ] deps += [ + "//chromeos/assistant/internal", "//chromeos/assistant/internal:build_libassistant", "//chromeos/assistant/internal/action", "//chromeos/assistant/internal/proto/google3", + "//chromeos/resources", + "//chromeos/services/assistant/public/proto", + "//chromeos/strings", "//libassistant/contrib/core", "//libassistant/contrib/platform/audio", "//libassistant/shared/internal_api/c:api_wrappers_entrypoint", @@ -101,6 +105,7 @@ source_set("tests") { "//base/test:test_support", "//chromeos", "//mojo/public/cpp/bindings:bindings", + "//services/device/public/mojom", "//services/identity/public/mojom", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", @@ -116,6 +121,8 @@ source_set("tests") { "platform/audio_output_provider_impl_unittest.cc", "platform/system_provider_impl_unittest.cc", ] + + deps += [ "//libassistant/shared/public" ] } } diff --git a/chromium/chromeos/services/assistant/public/mojom/assistant.mojom b/chromium/chromeos/services/assistant/public/mojom/assistant.mojom index a9438f73ff5..a1963d3d72e 100644 --- a/chromium/chromeos/services/assistant/public/mojom/assistant.mojom +++ b/chromium/chromeos/services/assistant/public/mojom/assistant.mojom @@ -26,9 +26,10 @@ interface Assistant { // Starts a new Assistant voice interaction. StartVoiceInteraction(); - // Stops the active Assistant interaction. If there is no active interaction, - // this method is a no-op. - StopActiveInteraction(); + // Stops the active Assistant interaction and cancel the conversation if + // |cancel_conversation|. If there is no active interaction, this method + // is a no-op. + StopActiveInteraction(bool cancel_conversation); // Send text query to assistant. Result will be returned through registered // |AssistantInteractionSubscriber|. @@ -57,6 +58,10 @@ interface Assistant { // voice queries, and may also be used in standalone screen context // interactions (see StartCachedScreenContextInteraction()). CacheScreenContext() => (); + + // Invoked when accessibility status is changed. Note that though + // accessibility status has changed, |spoken_feedback_enabled| may not have. + OnAccessibilityStatusChanged(bool spoken_feedback_enabled); }; // Subscribes to assistant's interaction event. These events are server driven @@ -71,8 +76,8 @@ interface AssistantInteractionSubscriber { // Assistant interaction has ended with the specified |resolution|. OnInteractionFinished(AssistantInteractionResolution resolution); - // Assistant got Html response from server. - OnHtmlResponse(string response); + // Assistant got Html response with fallback text from server. + OnHtmlResponse(string response, string fallback); // Assistant got suggestions response from server. OnSuggestionsResponse(array<AssistantSuggestion> response); @@ -134,26 +139,6 @@ interface Client { ax.mojom.AssistantTree? structure); }; -// Interface for assistant to call into browser for audio input related -// functions. -interface AudioInput { - // Registers audio input observer. We assume dual-channel, 16kHz and signed - // 32-bit int interleaved format. Audio stream starts recording as soon as - // the first observer is added. And will stop recording if last observer is - // closed. - AddObserver(AudioInputObserver observer); -}; - -// Observer for assistant to receive audio input data. -interface AudioInputObserver { - // Notifies that audio frames are available. - // TODO(muyuanli): Use data pipe. - OnAudioInputFramesAvailable(array<int32> buffer, uint32 frame_count, - mojo_base.mojom.TimeTicks timestamp); - // Notifies that audio input stream is closed. - OnAudioInputClosed(); -}; - // Interface for assistant to call into browser to perform device actions. interface DeviceActions { // Enables or disables WiFi. @@ -161,6 +146,17 @@ interface DeviceActions { // Enables or disables Bluetooth. SetBluetoothEnabled(bool enabled); + + // Gets the current screen brightness level (0-1.0). + // The level is set to 0 in the event of an error. + GetScreenBrightnessLevel() => (bool success, double level); + + // Sets the screen brightness level (0-1.0). If |gradual| is true, the + // transition will be animated. + SetScreenBrightnessLevel(double level, bool gradual); + + // Enables or disables Night Light. + SetNightLightEnabled(bool enabled); }; // Enumeration of possible completions for an Assistant interaction. diff --git a/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom b/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom index 009bb5b8edc..0421b2e5258 100644 --- a/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom +++ b/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom @@ -18,12 +18,15 @@ interface AssistantAudioDecoderFactory { interface AssistantAudioDecoder { // Reads the audio data format. OpenDecoder() => (bool success, - int32 bytes_per_sample, - int32 samples_per_second, - int32 channels); + uint32 bytes_per_sample, + uint32 samples_per_second, + uint32 channels); // Reads the audio data and decodes. Decode(); + + // Close decoder to clean up. + CloseDecoder() => (); }; // Interface for assistant audio decoder service to call into client. @@ -35,5 +38,5 @@ interface AssistantAudioDecoderClient { // Interface used to read data from the calling process. interface AssistantMediaDataSource { - Read(int32 size) => (array<uint8> data); + Read(uint32 size) => (array<uint8> data); }; diff --git a/chromium/chromeos/services/device_sync/BUILD.gn b/chromium/chromeos/services/device_sync/BUILD.gn index db010aba9c7..d0f6f8f093c 100644 --- a/chromium/chromeos/services/device_sync/BUILD.gn +++ b/chromium/chromeos/services/device_sync/BUILD.gn @@ -34,6 +34,7 @@ static_library("device_sync") { "//base", "//chromeos/components/proximity_auth/logging", "//chromeos/services/device_sync/public/mojom", + "//components/gcm_driver", "//net", "//services/identity/public/cpp", "//services/preferences/public/cpp", diff --git a/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom b/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom index 06f1e3f06df..f2d68a1f0b0 100644 --- a/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom +++ b/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom @@ -48,6 +48,11 @@ enum NetworkRequestResult { // Successful network request. kSuccess, + // The network request itself was successful, but it did not produce the + // expected result (e.g., called SetSoftwareFeatureState(), but the call did + // not result in the feature state changing). + kRequestSucceededButUnexpectedResult, + // Service was not yet initialized; could not complete request. kServiceNotYetInitialized, diff --git a/chromium/chromeos/services/ime/BUILD.gn b/chromium/chromeos/services/ime/BUILD.gn index 173d82e43d3..e170d6ce55f 100644 --- a/chromium/chromeos/services/ime/BUILD.gn +++ b/chromium/chromeos/services/ime/BUILD.gn @@ -20,6 +20,7 @@ source_set("lib") { deps = [ "//base", "//chromeos/services/ime/public/cpp:buildflags", + "//chromeos/services/ime/public/cpp:rulebased", "//chromeos/services/ime/public/mojom", "//services/service_manager/public/cpp", "//services/service_manager/public/mojom", @@ -41,6 +42,13 @@ service_manifest("manifest") { source_set("unit_tests") { testonly = true deps = [ + "//chromeos/services/ime/public/cpp:rulebased_unit_tests", + ] +} + +source_set("services_unittests") { + testonly = true + deps = [ ":lib", "//base", "//chromeos/services/ime/public/mojom", diff --git a/chromium/chromeos/services/ime/public/cpp/BUILD.gn b/chromium/chromeos/services/ime/public/cpp/BUILD.gn index 520a0d2cec1..9e6eee46197 100644 --- a/chromium/chromeos/services/ime/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/ime/public/cpp/BUILD.gn @@ -14,13 +14,42 @@ buildflag_header("buildflags") { ] } -source_set("features") { +source_set("rulebased") { sources = [ - "features.cc", - "features.h", + "rulebased/def/ar.h", + "rulebased/def/ckb_ar.h", + "rulebased/def/ckb_en.h", + "rulebased/def/fa.h", + "rulebased/def/km.h", + "rulebased/def/lo.h", + "rulebased/def/ne_inscript.h", + "rulebased/def/ru_phone_aatseel.h", + "rulebased/def/ru_phone_yazhert.h", + "rulebased/def/ta_inscript.h", + "rulebased/def/ta_typewriter.h", + "rulebased/def/th.h", + "rulebased/def/th_pattajoti.h", + "rulebased/def/th_tis.h", + "rulebased/engine.cc", + "rulebased/engine.h", + "rulebased/rules_data.cc", + "rulebased/rules_data.h", ] deps = [ "//base", ] } + +source_set("rulebased_unit_tests") { + testonly = true + deps = [ + ":rulebased", + "//base", + "//testing/gmock", + "//testing/gtest:gtest", + ] + sources = [ + "rulebased/rulebased_unittest.cc", + ] +} diff --git a/chromium/chromeos/services/machine_learning/public/mojom/graph_executor.mojom b/chromium/chromeos/services/machine_learning/public/mojom/graph_executor.mojom index caafb772f05..787dff09336 100644 --- a/chromium/chromeos/services/machine_learning/public/mojom/graph_executor.mojom +++ b/chromium/chromeos/services/machine_learning/public/mojom/graph_executor.mojom @@ -11,6 +11,19 @@ module chromeos.machine_learning.mojom; import "chromeos/services/machine_learning/public/mojom/tensor.mojom"; +enum ExecuteResult { + OK = 0, + INPUT_MISSING_ERROR, + UNKNOWN_INPUT_ERROR, + INPUT_TYPE_ERROR, + INPUT_SHAPE_ERROR, + INPUT_FORMAT_ERROR, + OUTPUT_MISSING_ERROR, + UNKNOWN_OUTPUT_ERROR, + DUPLICATE_OUTPUT_ERROR, + EXECUTION_ERROR, +}; + // API for performing inference on a TensorFlow graph. A given graph can be // executed multiple times with a single instance of GraphExecutor. interface GraphExecutor { @@ -18,5 +31,5 @@ interface GraphExecutor { // graph. The returned |outputs| are the values for the nodes specified in // |output_names|. Execute(map<string, Tensor> inputs, array<string> output_names) - => (array<Tensor> outputs); + => (ExecuteResult result, array<Tensor>? outputs); }; diff --git a/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom b/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom index 13e7166f901..6ce9f5e9bcf 100644 --- a/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom +++ b/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom @@ -13,8 +13,14 @@ module chromeos.machine_learning.mojom; import "chromeos/services/machine_learning/public/mojom/model.mojom"; +enum LoadModelResult { + OK = 0, + MODEL_SPEC_ERROR, + LOAD_MODEL_ERROR, +}; + // Top-level interface between Chromium and the ML Service daemon. interface MachineLearningService { // The ModelId inside ModelSpec is used to specify the model to be loaded. - LoadModel(ModelSpec spec, Model& request); + LoadModel(ModelSpec spec, Model& request) => (LoadModelResult result); }; diff --git a/chromium/chromeos/services/machine_learning/public/mojom/model.mojom b/chromium/chromeos/services/machine_learning/public/mojom/model.mojom index 473313f085e..959ace787a9 100644 --- a/chromium/chromeos/services/machine_learning/public/mojom/model.mojom +++ b/chromium/chromeos/services/machine_learning/public/mojom/model.mojom @@ -15,8 +15,13 @@ import "chromeos/services/machine_learning/public/mojom/graph_executor.mojom"; enum ModelId { UNKNOWN, - TAB_DISCARDER, - POWER_MANAGER + TEST_MODEL, // Only available in tests. +}; + +enum CreateGraphExecutorResult { + OK = 0, + MODEL_INTERPRETATION_ERROR, + MEMORY_ALLOCATION_ERROR, }; struct ModelSpec { @@ -27,5 +32,6 @@ struct ModelSpec { // interface pipe. The Model interface pipe can be used to acquire multiple // separate GraphExecutor instances. interface Model { - CreateGraphExecutor(GraphExecutor& request); + CreateGraphExecutor(GraphExecutor& request) => + (CreateGraphExecutorResult result); }; diff --git a/chromium/chromeos/services/machine_learning/public/mojom/tensor.mojom b/chromium/chromeos/services/machine_learning/public/mojom/tensor.mojom index 7828b55931e..786eaac24b3 100644 --- a/chromium/chromeos/services/machine_learning/public/mojom/tensor.mojom +++ b/chromium/chromeos/services/machine_learning/public/mojom/tensor.mojom @@ -13,22 +13,29 @@ module chromeos.machine_learning.mojom; -// Corresponds to tensorflow.BytesList protobuf: struct StringList { array<string> value; }; -// Corresponds to tensorflow.FloatList protobuf: -struct FloatList { +struct FloatList { array<double> value; }; -// Corresponds to tensorflow.Int64List protobuf: struct Int64List { array<int64> value; }; -// Corresponds to tensorflow.Feature protobuf: +// The union of all supported tensor types. Supporting a new type comprises the +// following: +// - Adding a new struct above (e.g. BoolList), +// - Adding this new struct to the union below, +// - Adding template specializations for the new type to +// platform2/ml/tensor_view.{h,cc}. +// - Updating platform2/ml/graph_executor_impl.cc to use a TensorView of the +// new type. +// +// TODO(chromium:836098): add new types (e.g. uint8, bool) as they become +// useful. union ValueList { StringList string_list; FloatList float_list; diff --git a/chromium/chromeos/services/media_perception/public/mojom/BUILD.gn b/chromium/chromeos/services/media_perception/public/mojom/BUILD.gn index 23b62e6a689..a51e3a76ed2 100644 --- a/chromium/chromeos/services/media_perception/public/mojom/BUILD.gn +++ b/chromium/chromeos/services/media_perception/public/mojom/BUILD.gn @@ -6,7 +6,8 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { sources = [ - "connector.mojom", + "media_perception.mojom", + "media_perception_service.mojom", ] public_deps = [ diff --git a/chromium/chromeos/services/media_perception/public/mojom/connector.mojom b/chromium/chromeos/services/media_perception/public/mojom/connector.mojom deleted file mode 100644 index 929709c088e..00000000000 --- a/chromium/chromeos/services/media_perception/public/mojom/connector.mojom +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2018 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. - -module chromeos.media_perception.mojom; - -import "services/video_capture/public/mojom/device_factory.mojom"; - -interface Connector { - // Interface for a process running outside of Chrome to connect to the - // video capture service directly via a Mojo pipe set up through a - // DeviceFactory request. - ConnectToVideoCaptureService(video_capture.mojom.DeviceFactory& request); -}; diff --git a/chromium/chromeos/services/media_perception/public/mojom/media_perception.mojom b/chromium/chromeos/services/media_perception/public/mojom/media_perception.mojom new file mode 100644 index 00000000000..8747054137d --- /dev/null +++ b/chromium/chromeos/services/media_perception/public/mojom/media_perception.mojom @@ -0,0 +1,8 @@ +// Copyright 2018 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. + +module chromeos.media_perception.mojom; + +interface MediaPerception { +}; diff --git a/chromium/chromeos/services/media_perception/public/mojom/media_perception_service.mojom b/chromium/chromeos/services/media_perception/public/mojom/media_perception_service.mojom new file mode 100644 index 00000000000..12151a5d6ce --- /dev/null +++ b/chromium/chromeos/services/media_perception/public/mojom/media_perception_service.mojom @@ -0,0 +1,29 @@ +// Copyright 2018 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. +// +// Next MinVersion: 1 + +module chromeos.media_perception.mojom; + +import "chromeos/services/media_perception/public/mojom/media_perception.mojom"; +import "services/video_capture/public/mojom/device_factory.mojom"; + +// Used to establish two-way communication between a client and the media +// perception service. +interface MediaPerceptionService { + GetController@0(MediaPerceptionController& request, + MediaPerceptionControllerClient client); +}; + +interface MediaPerceptionController { + // Used by the client to establish a MediaPerception pipe. + ActivateMediaPerception@0(MediaPerception& request); +}; + +interface MediaPerceptionControllerClient { + // Interface for the service to connect to the Video Capture Service + // directly via a Mojo pipe set up through a DeviceFactory request. + ConnectToVideoCaptureService@0(video_capture.mojom.DeviceFactory& request); +}; + diff --git a/chromium/chromeos/services/multidevice_setup/BUILD.gn b/chromium/chromeos/services/multidevice_setup/BUILD.gn index 91fbd954c3f..cab1d1d9b20 100644 --- a/chromium/chromeos/services/multidevice_setup/BUILD.gn +++ b/chromium/chromeos/services/multidevice_setup/BUILD.gn @@ -14,6 +14,8 @@ static_library("multidevice_setup") { "account_status_change_delegate_notifier.h", "account_status_change_delegate_notifier_impl.cc", "account_status_change_delegate_notifier_impl.h", + "android_sms_app_installing_status_observer.cc", + "android_sms_app_installing_status_observer.h", "device_reenroller.cc", "device_reenroller.h", "eligible_host_devices_provider.h", @@ -23,10 +25,15 @@ static_library("multidevice_setup") { "feature_state_manager.h", "feature_state_manager_impl.cc", "feature_state_manager_impl.h", + "grandfathered_easy_unlock_host_disabler.cc", + "grandfathered_easy_unlock_host_disabler.h", "host_backend_delegate.cc", "host_backend_delegate.h", "host_backend_delegate_impl.cc", "host_backend_delegate_impl.h", + "host_device_timestamp_manager.h", + "host_device_timestamp_manager_impl.cc", + "host_device_timestamp_manager_impl.h", "host_status_provider.cc", "host_status_provider.h", "host_status_provider_impl.cc", @@ -43,9 +50,10 @@ static_library("multidevice_setup") { "multidevice_setup_initializer.h", "multidevice_setup_service.cc", "multidevice_setup_service.h", - "setup_flow_completion_recorder.h", - "setup_flow_completion_recorder_impl.cc", - "setup_flow_completion_recorder_impl.h", + "privileged_host_device_setter_base.cc", + "privileged_host_device_setter_base.h", + "privileged_host_device_setter_impl.cc", + "privileged_host_device_setter_impl.h", ] deps = [ @@ -55,7 +63,9 @@ static_library("multidevice_setup") { "//chromeos/services/device_sync/public/mojom", "//chromeos/services/multidevice_setup/proto", "//chromeos/services/multidevice_setup/public/cpp:android_sms_app_helper_delegate", + "//chromeos/services/multidevice_setup/public/cpp:android_sms_pairing_state_tracker", "//chromeos/services/multidevice_setup/public/cpp:auth_token_validator", + "//chromeos/services/multidevice_setup/public/cpp:oobe_completion_tracker", "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/multidevice_setup/public/mojom", "//chromeos/services/secure_channel/public/cpp/client", @@ -88,14 +98,14 @@ static_library("test_support") { "fake_feature_state_observer.h", "fake_host_backend_delegate.cc", "fake_host_backend_delegate.h", + "fake_host_device_timestamp_manager.cc", + "fake_host_device_timestamp_manager.h", "fake_host_status_observer.cc", "fake_host_status_observer.h", "fake_host_status_provider.cc", "fake_host_status_provider.h", "fake_host_verifier.cc", "fake_host_verifier.h", - "fake_setup_flow_completion_recorder.cc", - "fake_setup_flow_completion_recorder.h", ] deps = [ @@ -113,15 +123,18 @@ source_set("unit_tests") { sources = [ "account_status_change_delegate_notifier_impl_unittest.cc", + "android_sms_app_installing_status_observer_unittest.cc", "device_reenroller_unittest.cc", "eligible_host_devices_provider_impl_unittest.cc", "feature_state_manager_impl_unittest.cc", + "grandfathered_easy_unlock_host_disabler_unittest.cc", "host_backend_delegate_impl_unittest.cc", + "host_device_timestamp_manager_impl_unittest.cc", "host_status_provider_impl_unittest.cc", "host_verifier_impl_unittest.cc", "multidevice_setup_impl_unittest.cc", "multidevice_setup_service_unittest.cc", - "setup_flow_completion_recorder_impl_unittest.cc", + "privileged_host_device_setter_impl_unittest.cc", ] deps = [ @@ -130,6 +143,7 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//chromeos/services/device_sync/public/cpp:test_support", + "//chromeos/services/multidevice_setup/public/cpp:oobe_completion_tracker", "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/multidevice_setup/public/cpp:test_support", "//chromeos/services/multidevice_setup/public/cpp:unit_tests", diff --git a/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn b/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn index 4d36b56ff45..cf222523aeb 100644 --- a/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn @@ -35,7 +35,18 @@ source_set("android_sms_app_helper_delegate") { "android_sms_app_helper_delegate.h", ] - public_deps = [ + deps = [ + "//base", + ] +} + +source_set("android_sms_pairing_state_tracker") { + sources = [ + "android_sms_pairing_state_tracker.cc", + "android_sms_pairing_state_tracker.h", + ] + + deps = [ "//base", ] } @@ -48,10 +59,37 @@ source_set("prefs") { deps = [ "//base", + "//chromeos/services/multidevice_setup/public/mojom", "//components/prefs:prefs", ] } +source_set("first_run_field_trial") { + sources = [ + "first_run_field_trial.cc", + "first_run_field_trial.h", + ] + + deps = [ + "//base", + "//chromeos", + "//components/variations/proto", + "//components/variations/service", + ] +} + +source_set("oobe_completion_tracker") { + sources = [ + "oobe_completion_tracker.cc", + "oobe_completion_tracker.h", + ] + + deps = [ + "//base", + "//components/keyed_service/core", + ] +} + source_set("url_provider") { sources = [ "url_provider.cc", @@ -70,16 +108,21 @@ static_library("test_support") { sources = [ "fake_android_sms_app_helper_delegate.cc", "fake_android_sms_app_helper_delegate.h", + "fake_android_sms_pairing_state_tracker.cc", + "fake_android_sms_pairing_state_tracker.h", "fake_auth_token_validator.cc", "fake_auth_token_validator.h", "fake_multidevice_setup.cc", "fake_multidevice_setup.h", "fake_multidevice_setup_client.cc", "fake_multidevice_setup_client.h", + "fake_privileged_host_device_setter.cc", + "fake_privileged_host_device_setter.h", ] public_deps = [ ":android_sms_app_helper_delegate", + ":android_sms_pairing_state_tracker", ":auth_token_validator", ":cpp", "//chromeos/services/multidevice_setup", diff --git a/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom b/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom index 01b762b547b..94e32b29d08 100644 --- a/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom +++ b/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom @@ -78,7 +78,11 @@ enum FeatureState { // The feature has been enabled by the user, but it is still unavailable // because the entire Better Together suite has been disabled by the user. - kUnavailableSuiteDisabled + kUnavailableSuiteDisabled, + + // The feature still requires further setup to be ready for use (e.g., Android + // Messages requires a separate pairing flow after unified setup). + kFurtherSetupRequired, }; interface AccountStatusChangeDelegate { @@ -87,17 +91,24 @@ interface AccountStatusChangeDelegate { // called if the current user has not yet set up MultiDevice features. OnPotentialHostExistsForNewUser(); + // Callback which indicates that the account left the state of having a + // potential host ready for setup. Note that it is called both when a host is + // set and when there are simply no host devices (i.e. neither potential nor + // set) on the account anymore. This function is only called if the current + // user has not yet set up MultiDevice features and received backend + // confirmation. + OnNoLongerNewUser(); + // Callback which indicates that the currently-connected MultiDevice host has // changed. This likely means that the user has changed MultiDevice settings // on another device. This function is only called if the current user has - // already set up MultiDevice features. Note: |new_host_device_name| is - // expected to be a UTF-8 string. + // already set up MultiDevice features. OnConnectedHostSwitchedForExistingUser(string new_host_device_name); // Callback which indicates that a new Chromebook was added to the account of // the current user. This function is only called if the current user has // already set up MultiDevice features. - OnNewChromebookAddedForExistingUser(); + OnNewChromebookAddedForExistingUser(string new_host_device_name); }; interface HostStatusObserver { @@ -114,8 +125,8 @@ interface FeatureStateObserver { }; // Provides an API to the MultiDevice Setup flow. Designed to be exposed -// primarily to the MultiDevice setup flow at chrome://multidevice-setup (normal -// usage) as well as the ProximityAuth debug WebUI page at +// primarily to the MultiDevice setup flow at chrome://multidevice-setup and +// chrome://oobe (normal usage) as well as the ProximityAuth debug WebUI page at // chrome://proximity-auth (debugging only). interface MultiDeviceSetup { // Registers the "account status change" delegate to be used by the service. @@ -136,16 +147,16 @@ interface MultiDeviceSetup { GetEligibleHostDevices() => (array<chromeos.device_sync.mojom.RemoteDevice> eligible_host_devices); - // Sets the host associated with the provided public key as the host device + // Sets the host associated with the provided device ID as the host device // for this account. The provided auth token must be valid in order to prove // that the user is authenticated. If called when there is no current host or // when the current host is a different device from the one passed, this // function initiates a connection to the back-end and attempts to set the // host. When called with the same device that is already the host, this // function is a no-op. Returns a success boolean; this function will fail if - // the provided public key does not correspond to an eligible host device on + // the provided device ID does not correspond to an eligible host device on // the account, or the provided auth token is invalid. - SetHostDevice(string public_key, string auth_token) => (bool success); + SetHostDevice(string device_id, string auth_token) => (bool success); // Removes the currently-set host as the multi-device host for this account. // If there was no host set to begin with, this function is a no-op. @@ -190,3 +201,12 @@ interface MultiDeviceSetup { // During normal usage, events are triggered internally within the service. TriggerEventForDebugging(EventTypeForDebugging type) => (bool success); }; + +// Provides an API for setting a MultiDevice host without the need to provide an +// auth token. This interface should only be used in circumstances when the user +// has just entered their password. +interface PrivilegedHostDeviceSetter { + // Same functionality as MultiDeviceSetup's SetHostDevice() function above, + // except that no auth token is required. + SetHostDevice(string device_id) => (bool success); +}; diff --git a/chromium/chromeos/services/secure_channel/BUILD.gn b/chromium/chromeos/services/secure_channel/BUILD.gn index 1fea8aeaa34..27039ef751f 100644 --- a/chromium/chromeos/services/secure_channel/BUILD.gn +++ b/chromium/chromeos/services/secure_channel/BUILD.gn @@ -78,6 +78,7 @@ static_library("secure_channel") { "multiplexed_channel.h", "multiplexed_channel_impl.cc", "multiplexed_channel_impl.h", + "pending_ble_connection_request_base.h", "pending_ble_initiator_connection_request.cc", "pending_ble_initiator_connection_request.h", "pending_ble_listener_connection_request.cc", @@ -210,6 +211,7 @@ source_set("unit_tests") { "connection_attempt_base_unittest.cc", "error_tolerant_ble_advertisement_impl_unittest.cc", "multiplexed_channel_impl_unittest.cc", + "pending_ble_connection_request_base_unittest.cc", "pending_ble_initiator_connection_request_unittest.cc", "pending_ble_listener_connection_request_unittest.cc", "pending_connection_manager_impl_unittest.cc", diff --git a/chromium/chromeos/services/secure_channel/public/mojom/secure_channel.mojom b/chromium/chromeos/services/secure_channel/public/mojom/secure_channel.mojom index 94261694ece..f58a8c40bda 100644 --- a/chromium/chromeos/services/secure_channel/public/mojom/secure_channel.mojom +++ b/chromium/chromeos/services/secure_channel/public/mojom/secure_channel.mojom @@ -34,7 +34,13 @@ enum ConnectionAttemptFailureReason { REMOTE_DEVICE_INVALID_PSK, // Timeouts occurred trying to contact the remote device. - TIMEOUT_FINDING_DEVICE + TIMEOUT_FINDING_DEVICE, + + // The local Bluetooth adapter is disabled (turned off). + ADAPTER_DISABLED, + + // The local Bluetooth adapter is not present. + ADAPTER_NOT_PRESENT }; enum ConnectionCreationDetail { diff --git a/chromium/chromeos/settings/BUILD.gn b/chromium/chromeos/settings/BUILD.gn new file mode 100644 index 00000000000..599a8972716 --- /dev/null +++ b/chromium/chromeos/settings/BUILD.gn @@ -0,0 +1,64 @@ +# Copyright 2018 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. + +import("//build/config/chromeos/rules.gni") +import("//testing/test.gni") +import("//third_party/protobuf/proto_library.gni") + +assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos") + +source_set("settings") { + public_deps = [ + ":cros_settings_names", + ] + deps = [ + "//base", + "//base:i18n", + "//chromeos:chromeos_constants", + "//chromeos:chromeos_export", + "//chromeos/login", + "//dbus", + "//third_party/icu", + "//third_party/protobuf:protobuf_lite", + ] + sources = [ + "cros_settings_provider.cc", + "cros_settings_provider.h", + "system_settings_provider.cc", + "system_settings_provider.h", + "timezone_settings.cc", + "timezone_settings.h", + "timezone_settings_helper.cc", + "timezone_settings_helper.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("cros_settings_names") { + deps = [ + "//chromeos:chromeos_export", + ] + sources = [ + "cros_settings_names.cc", + "cros_settings_names.h", + ] + defines = [ "CHROMEOS_IMPLEMENTATION" ] +} + +source_set("unit_tests") { + testonly = true + deps = [ + ":settings", + "//base", + "//base:i18n", + "//dbus", + "//testing/gmock", + "//testing/gtest", + "//third_party/icu", + "//third_party/protobuf:protobuf_lite", + ] + sources = [ + "timezone_settings_unittest.cc", + ] +} |