}
DownloadManager.prototype.start = function() {
+ xwalk.utils.checkPrivilegeAccess(xwalk.utils.privilege.DOWNLOAD);
+
var args = validator_.validateArgs(arguments, [
{'name' : 'downloadRequest', 'type': types_.PLATFORM_OBJECT, 'values': tizen.DownloadRequest},
{'name' : 'downloadCallback', 'type': types_.LISTENER,
std::vector<DownloadInstance*> DownloadInstance::instances_;
std::mutex DownloadInstance::instances_mutex_;
-namespace {
-// The privileges that required in Download API
-const std::string kPrivilegeDownload = "http://tizen.org/privilege/download";
-
-} // namespace
-
using common::NotFoundException;
using common::UnknownException;
using common::NetworkException;
void DownloadInstance::DownloadManagerStart
(const picojson::value& args, picojson::object& out) {
- CHECK_PRIVILEGE_ACCESS(kPrivilegeDownload, &out);
CHECK_EXIST(args, "callbackId", out)
int ret, downlodId;