Commit 372e1169 authored by Anthony Vallee-Dubois's avatar Anthony Vallee-Dubois Committed by Commit Bot

Move device_account_initializer to platform-agnostic location

Following up on https://chromium-review.googlesource.com/c/chromium/src/+/2067624, this CL is one step to allow managed browsers on linux/windows/macos to obtain a device-level service account to be used to register for policy invalidations over FCM.

DeviceAccountIntializer was mostly platform-agnostic already, so this only moves it to c/b/policy and removes a bunch of now unused includes (I imagine it was refactored some time ago).

Bug: 1026261

Change-Id: I97ca06772e836fe10a115f7071b1c697a8a5071e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122391Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Commit-Queue: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754892}
parent 4ab9f0e0
......@@ -3405,6 +3405,8 @@ jumbo_static_library("browser") {
"performance_manager/persistence/site_data/tab_visibility.h",
"permissions/attestation_permission_request.cc",
"permissions/attestation_permission_request.h",
"policy/device_account_initializer.cc",
"policy/device_account_initializer.h",
"policy/local_sync_policy_handler.cc",
"policy/local_sync_policy_handler.h",
"process_singleton_modal_dialog_lock.cc",
......
......@@ -1811,8 +1811,6 @@ source_set("chromeos") {
"policy/component_active_directory_policy_service.h",
"policy/configuration_policy_handler_chromeos.cc",
"policy/configuration_policy_handler_chromeos.h",
"policy/device_account_initializer.cc",
"policy/device_account_initializer.h",
"policy/device_auto_update_time_restrictions_decoder.cc",
"policy/device_auto_update_time_restrictions_decoder.h",
"policy/device_auto_update_time_restrictions_utils.cc",
......
......@@ -13,16 +13,16 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
#include "chrome/browser/chromeos/policy/device_account_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
#include "chrome/browser/chromeos/policy/enrollment_config.h"
#include "chrome/browser/policy/device_account_initializer.h"
#include "components/policy/core/common/cloud/enterprise_metrics.h"
#include "google_apis/gaia/google_service_auth_error.h"
namespace policy {
class DMAuth;
class PolicyOAuth2TokenFetcher;
}
} // namespace policy
namespace chromeos {
......
......@@ -13,10 +13,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
#include "chrome/browser/chromeos/policy/device_account_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_validator.h"
#include "chrome/browser/chromeos/policy/enrollment_config.h"
#include "chrome/browser/policy/device_account_initializer.h"
#include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/constants/attestation_constants.h"
#include "chromeos/tpm/install_attributes.h"
......@@ -37,7 +37,7 @@ class ActiveDirectoryJoinDelegate;
namespace attestation {
class AttestationFlow;
}
}
} // namespace chromeos
namespace policy {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/policy/device_account_initializer.h"
#include "chrome/browser/policy/device_account_initializer.h"
#include <utility>
......@@ -18,24 +18,11 @@
#include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
#include "chrome/browser/chromeos/policy/active_directory_join_delegate.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
#include "chrome/browser/chromeos/policy/dm_token_storage.h"
#include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/device_identity/device_oauth2_token_service.h"
#include "chrome/browser/device_identity/device_oauth2_token_service_factory.h"
#include "chrome/browser/policy/enrollment_status.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/attestation/attestation_flow.h"
#include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "components/policy/core/common/cloud/dm_auth.h"
#include "components/policy/proto/chrome_device_policy.pb.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/http/http_status_code.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
#define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
#ifndef CHROME_BROWSER_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
#define CHROME_BROWSER_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
#include <memory>
#include <string>
......@@ -14,7 +14,6 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
#include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
......@@ -115,4 +114,4 @@ class DeviceAccountInitializer : public CloudPolicyClient::Observer,
} // namespace policy
#endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
#endif // CHROME_BROWSER_POLICY_DEVICE_ACCOUNT_INITIALIZER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment