Commit 7217b543 authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI cleanup: Remove calls to cr.exportPath() in chrome://management.

Bug: 986481
Change-Id: I3eb011a34bb225eb137c1ee80e95774ed0d6753f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1714384
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Roman Aleksandrov <raleksandrov@google.com>
Reviewed-by: default avatarRoman Aleksandrov <raleksandrov@google.com>
Cr-Commit-Position: refs/heads/master@{#680056}
parent 2bd73443
......@@ -2,33 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.exportPath('management');
/**
cr.define('management', function() {
/**
* @typedef {{
* name: string,
* permissions: !Array<string>
* }}
*/
management.Extension;
let Extension;
/** @enum {string} */
management.ReportingType = {
/** @enum {string} */
const ReportingType = {
SECURITY: 'security',
DEVICE: 'device',
USER: 'user',
USER_ACTIVITY: 'user-activity',
EXTENSIONS: 'extensions'
};
};
/**
/**
* @typedef {{
* messageId: string,
* reportingType: !management.ReportingType,
* }}
*/
management.BrowserReportingResponse;
let BrowserReportingResponse;
/**
/**
* @typedef {{
* browserManagementNotice: string,
* extensionReportingTitle: string,
......@@ -38,14 +38,14 @@ management.BrowserReportingResponse;
* customerLogo: string,
* }}
*/
management.ManagedDataResponse;
let ManagedDataResponse;
// <if expr="chromeos">
/**
// <if expr="chromeos">
/**
* @enum {string} Look at ToJSDeviceReportingType usage in
* management_ui_handler.cc for more details.
*/
management.DeviceReportingType = {
const DeviceReportingType = {
SUPERVISED_USER: 'supervised user',
DEVICE_ACTIVITY: 'device activity',
STATISTIC: 'device statistics',
......@@ -53,19 +53,18 @@ management.DeviceReportingType = {
LOGS: 'logs',
PRINT: 'print',
CROSTINI: 'crostini'
};
};
/**
/**
* @typedef {{
* messageId: string,
* reportingType: !management.DeviceReportingType,
* }}
*/
management.DeviceReportingResponse;
// </if>
let DeviceReportingResponse;
// </if>
cr.define('management', function() {
/** @interface */
class ManagementBrowserProxy {
/** @return {!Promise<!Array<!management.Extension>>} */
......@@ -128,7 +127,15 @@ cr.define('management', function() {
cr.addSingletonGetter(ManagementBrowserProxyImpl);
return {
BrowserReportingResponse: BrowserReportingResponse,
// <if expr="chromeos">
DeviceReportingResponse: DeviceReportingResponse,
DeviceReportingType: DeviceReportingType,
// </if>
Extension: Extension,
ManagedDataResponse: ManagedDataResponse,
ManagementBrowserProxyImpl: ManagementBrowserProxyImpl,
ManagementBrowserProxy: ManagementBrowserProxy,
ManagementBrowserProxyImpl: ManagementBrowserProxyImpl
ReportingType: ReportingType,
};
});
......@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.exportPath('management');
/**
cr.define('management', function() {
/**
* @typedef {{
* messageIds: !Array<string>,
* icon: string,
* }}
*/
management.BrowserReportingData;
let BrowserReportingData;
Polymer({
Polymer({
is: 'management-ui',
behaviors: [
......@@ -156,7 +156,8 @@ Polymer({
* @private
*/
showDeviceReportingInfo_() {
return !!this.deviceReportingInfo_ && this.deviceReportingInfo_.length > 0;
return !!this.deviceReportingInfo_ &&
this.deviceReportingInfo_.length > 0;
},
/**
......@@ -262,4 +263,9 @@ Polymer({
// </if>
});
},
});
return {
BrowserReportingData: BrowserReportingData,
};
});
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