blob: 2d1a40f1e7fd692ff13c848baf90ada94b24571e [file] [log] [blame]
// Copyright (c) 2012 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.
[
{
"namespace": "echoPrivate",
"compiler_options": {
"implemented_in": "chrome/browser/chromeos/extensions/echo_private_api.h"
},
"description": "none",
"platforms": ["chromeos"],
"functions": [
{
"name": "getRegistrationCode",
"description": "Get the group or coupon code from underlying storage.",
"type": "function",
"parameters": [
{
"name": "type",
"type": "string",
"description": "Type of coupon code requested to be read (coupon or group)."
},
{
"name": "callback",
"type": "function",
"parameters": [
{
"name": "result",
"type": "string",
"description" : "The coupon code."
}
]
}
]
},
{
"name": "getOobeTimestamp",
"description": "Get the OOBE timestamp.",
"type": "function",
"parameters": [
{
"name": "callback",
"type": "function",
"parameters": [
{
"name": "result",
"type": "string",
"description" : "The OOBE timestamp."
}
]
}
]
},
{
"name": "checkAllowRedeemOffers",
"description": "Check if device policy allows users to redeem offers.",
"type": "function",
"parameters": [
{
"name": "callback",
"type": "function",
"parameters": [
{
"name": "result",
"type": "boolean",
"description" : "true if allowed to redeem offers."
}
]
}
]
},
{
"name": "getUserConsent",
"description": "If device policy allows user to redeem offer, displays a native dialog asking user for a consent to verify device's eligibility for the offer. If the device policy forbids user to redeem offers, displays a native dialog informing user the offer redeeming is disabled.",
"type": "function",
"parameters": [
{
"name": "consentRequester",
"description": "Information about the service requesting user consent.",
"type": "object",
"properties": {
"serviceName": {
"type": "string",
"minLength": 1,
"description": "User friendly name of the service that is requesting the consent."
},
"origin": {
"type": "string",
"description": "URL origin of the service requesting the consent."
}
}
},
{
"name": "callback",
"type": "function",
"parameters": [
{
"name": "result",
"type": "boolean",
"description": "Whether the user consent was given."
}
]
}
]
}
]
}
]