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 @@ ...@@ -2,33 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
cr.exportPath('management'); cr.define('management', function() {
/** /**
* @typedef {{ * @typedef {{
* name: string, * name: string,
* permissions: !Array<string> * permissions: !Array<string>
* }} * }}
*/ */
management.Extension; let Extension;
/** @enum {string} */ /** @enum {string} */
management.ReportingType = { const ReportingType = {
SECURITY: 'security', SECURITY: 'security',
DEVICE: 'device', DEVICE: 'device',
USER: 'user', USER: 'user',
USER_ACTIVITY: 'user-activity', USER_ACTIVITY: 'user-activity',
EXTENSIONS: 'extensions' EXTENSIONS: 'extensions'
}; };
/** /**
* @typedef {{ * @typedef {{
* messageId: string, * messageId: string,
* reportingType: !management.ReportingType, * reportingType: !management.ReportingType,
* }} * }}
*/ */
management.BrowserReportingResponse; let BrowserReportingResponse;
/** /**
* @typedef {{ * @typedef {{
* browserManagementNotice: string, * browserManagementNotice: string,
* extensionReportingTitle: string, * extensionReportingTitle: string,
...@@ -38,14 +38,14 @@ management.BrowserReportingResponse; ...@@ -38,14 +38,14 @@ management.BrowserReportingResponse;
* customerLogo: string, * customerLogo: string,
* }} * }}
*/ */
management.ManagedDataResponse; let ManagedDataResponse;
// <if expr="chromeos"> // <if expr="chromeos">
/** /**
* @enum {string} Look at ToJSDeviceReportingType usage in * @enum {string} Look at ToJSDeviceReportingType usage in
* management_ui_handler.cc for more details. * management_ui_handler.cc for more details.
*/ */
management.DeviceReportingType = { const DeviceReportingType = {
SUPERVISED_USER: 'supervised user', SUPERVISED_USER: 'supervised user',
DEVICE_ACTIVITY: 'device activity', DEVICE_ACTIVITY: 'device activity',
STATISTIC: 'device statistics', STATISTIC: 'device statistics',
...@@ -53,19 +53,18 @@ management.DeviceReportingType = { ...@@ -53,19 +53,18 @@ management.DeviceReportingType = {
LOGS: 'logs', LOGS: 'logs',
PRINT: 'print', PRINT: 'print',
CROSTINI: 'crostini' CROSTINI: 'crostini'
}; };
/** /**
* @typedef {{ * @typedef {{
* messageId: string, * messageId: string,
* reportingType: !management.DeviceReportingType, * reportingType: !management.DeviceReportingType,
* }} * }}
*/ */
management.DeviceReportingResponse; let DeviceReportingResponse;
// </if> // </if>
cr.define('management', function() {
/** @interface */ /** @interface */
class ManagementBrowserProxy { class ManagementBrowserProxy {
/** @return {!Promise<!Array<!management.Extension>>} */ /** @return {!Promise<!Array<!management.Extension>>} */
...@@ -128,7 +127,15 @@ cr.define('management', function() { ...@@ -128,7 +127,15 @@ cr.define('management', function() {
cr.addSingletonGetter(ManagementBrowserProxyImpl); cr.addSingletonGetter(ManagementBrowserProxyImpl);
return { return {
BrowserReportingResponse: BrowserReportingResponse,
// <if expr="chromeos">
DeviceReportingResponse: DeviceReportingResponse,
DeviceReportingType: DeviceReportingType,
// </if>
Extension: Extension,
ManagedDataResponse: ManagedDataResponse,
ManagementBrowserProxyImpl: ManagementBrowserProxyImpl,
ManagementBrowserProxy: ManagementBrowserProxy, ManagementBrowserProxy: ManagementBrowserProxy,
ManagementBrowserProxyImpl: ManagementBrowserProxyImpl ReportingType: ReportingType,
}; };
}); });
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
cr.exportPath('management'); cr.define('management', function() {
/** /**
* @typedef {{ * @typedef {{
* messageIds: !Array<string>, * messageIds: !Array<string>,
* icon: string, * icon: string,
* }} * }}
*/ */
management.BrowserReportingData; let BrowserReportingData;
Polymer({ Polymer({
is: 'management-ui', is: 'management-ui',
behaviors: [ behaviors: [
...@@ -156,7 +156,8 @@ Polymer({ ...@@ -156,7 +156,8 @@ Polymer({
* @private * @private
*/ */
showDeviceReportingInfo_() { showDeviceReportingInfo_() {
return !!this.deviceReportingInfo_ && this.deviceReportingInfo_.length > 0; return !!this.deviceReportingInfo_ &&
this.deviceReportingInfo_.length > 0;
}, },
/** /**
...@@ -262,4 +263,9 @@ Polymer({ ...@@ -262,4 +263,9 @@ Polymer({
// </if> // </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