Commit e43d6f91 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

[policy] remove device_management_backend.pb.h include

device_management_backend.pb.h is 1.5MB.
Removing such header include reduces compile time of some files.
e.g.
compile time of obj/chrome/browser/browser/chrome_content_browser_client.o is improved from 30.2s to 29.7s.

Bug: 242216
Change-Id: If05857d45165756b6e86330f332280ad20ee3458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1502318
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637640}
parent c86ed7ef
......@@ -16,6 +16,7 @@
#include "chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "google_apis/gaia/gaia_auth_util.h"
using RetrievePolicyResponseType =
......
......@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "components/policy/core/common/cloud/cloud_external_data_manager.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace policy {
......@@ -20,6 +21,11 @@ CloudPolicyStore::~CloudPolicyStore() {
DCHECK(!external_data_manager_);
}
bool CloudPolicyStore::is_managed() const {
return policy_.get() &&
policy_->state() == enterprise_management::PolicyData::ACTIVE;
}
void CloudPolicyStore::Store(
const enterprise_management::PolicyFetchResponse& policy,
int64_t invalidation_version) {
......
......@@ -16,7 +16,10 @@
#include "components/policy/core/common/cloud/cloud_policy_validator.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/policy_export.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace enterprise_management {
class PolicyData;
}
namespace policy {
......@@ -76,10 +79,7 @@ class POLICY_EXPORT CloudPolicyStore {
const enterprise_management::PolicyData* policy() const {
return policy_.get();
}
bool is_managed() const {
return policy_.get() &&
policy_->state() == enterprise_management::PolicyData::ACTIVE;
}
bool is_managed() const;
Status status() const { return status_; }
CloudPolicyValidatorBase::Status validation_status() const {
return validation_result_.get() ? validation_result_->status
......
......@@ -7,6 +7,7 @@
#include <utility>
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace policy {
namespace {
......
......@@ -4,6 +4,8 @@
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace policy {
MockCloudPolicyStore::MockCloudPolicyStore() {}
......
......@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include "components/policy/core/common/cloud/mock_user_cloud_policy_store.h"
#include "base/sequenced_task_runner.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace policy {
......
......@@ -12,6 +12,7 @@
#include "base/values.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace {
const char kUserDMTokenKey[] = "user_dmtoken";
......
......@@ -14,6 +14,7 @@
#include "base/values.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "net/http/http_request_headers.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
......
......@@ -12,6 +12,7 @@
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_proto_decoders.h"
#include "components/policy/proto/cloud_policy.pb.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace policy {
......
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