Commit 92220c41 authored by Roger Tawa's avatar Roger Tawa Committed by Commit Bot

Add enterprise connector URL parameters to reporting endpoint.

Bug: 1069049
Change-Id: I3ca779e3bbda80abeae89bd035c9159c4dca853c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250513
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: default avatarDominique Fauteux-Chapleau <domfc@chromium.org>
Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780054}
parent 9bf2d6f2
# Copyright 2020 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.
static_library("strings") {
sources = [
"strings.cc",
"strings.h",
]
}
// Copyright 2020 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 "components/enterprise/common/strings.h"
namespace enterprise {
const char kUrlParamConnector[] = "connector";
const char kUrlParamDeviceToken[] = "device_token";
} // namespace enterprise
// Copyright 2020 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.
#ifndef COMPONENTS_ENTERPRISE_COMMON_STRINGS_H_
#define COMPONENTS_ENTERPRISE_COMMON_STRINGS_H_
namespace enterprise {
// URL parameters used when enterprise connectors call on service provider
// endpoints.
extern const char kUrlParamConnector[];
extern const char kUrlParamDeviceToken[];
} // namespace enterprise
#endif // COMPONENTS_ENTERPRISE_COMMON_STRINGS_H_
include_rules = [
"+components/enterprise",
"+components/json_schema",
"+components/prefs",
"+components/version_info",
......
......@@ -167,6 +167,7 @@ jumbo_source_set("internal") {
"//base:i18n",
"//base/third_party/dynamic_annotations",
"//components/account_id",
"//components/enterprise/common:strings",
"//components/prefs",
"//components/signin/public/identity_manager",
"//components/strings",
......
......@@ -8,6 +8,7 @@
#include "base/json/json_writer.h"
#include "base/optional.h"
#include "base/path_service.h"
#include "components/enterprise/common/strings.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_util.h"
#include "components/policy/core/common/cloud/dm_auth.h"
......@@ -68,6 +69,8 @@ RealtimeReportingJobConfiguration::RealtimeReportingJobConfiguration(
DCHECK(GetAuth().has_dm_token());
AddParameter("key", google_apis::GetAPIKey());
AddParameter(enterprise::kUrlParamConnector, "OnSecurityEvent");
AddParameter(enterprise::kUrlParamDeviceToken, client->dm_token());
InitializePayload(client);
}
......
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