OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [permissions=downloads] | 5 [permissions=downloads] |
6 namespace downloads { | 6 namespace downloads { |
7 [inline_doc] dictionary HeaderNameValuePair { | 7 [inline_doc] dictionary HeaderNameValuePair { |
8 // Name of the HTTP header. | 8 // Name of the HTTP header. |
9 DOMString name; | 9 DOMString name; |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // <dl><dt>file</dt> | 41 // <dl><dt>file</dt> |
42 // <dd>The download's filename is suspicious.</dd> | 42 // <dd>The download's filename is suspicious.</dd> |
43 // <dt>url</dt> | 43 // <dt>url</dt> |
44 // <dd>The download's URL is known to be malicious.</dd> | 44 // <dd>The download's URL is known to be malicious.</dd> |
45 // <dt>content</dt> | 45 // <dt>content</dt> |
46 // <dd>The downloaded file is known to be malicious.</dd> | 46 // <dd>The downloaded file is known to be malicious.</dd> |
47 // <dt>uncommon</dt> | 47 // <dt>uncommon</dt> |
48 // <dd>The download's URL is not commonly downloaded and could be | 48 // <dd>The download's URL is not commonly downloaded and could be |
49 // dangerous.</dd> | 49 // dangerous.</dd> |
| 50 // <dt>host</dt> |
| 51 // <dd>The download came from a host known to distribute malicious |
| 52 // binaries and is likely dangerous.</dd> |
50 // <dt>safe</dt> | 53 // <dt>safe</dt> |
51 // <dd>The download presents no known danger to the user's computer.</dd> | 54 // <dd>The download presents no known danger to the user's computer.</dd> |
52 // </dl> | 55 // </dl> |
53 // These string constants will never change, however the set of DangerTypes | 56 // These string constants will never change, however the set of DangerTypes |
54 // may change. | 57 // may change. |
55 enum DangerType {file, url, content, uncommon, safe}; | 58 enum DangerType {file, url, content, uncommon, host, safe}; |
56 | 59 |
57 // <dl><dt>in_progress</dt> | 60 // <dl><dt>in_progress</dt> |
58 // <dd>The download is currently receiving data from the server.</dd> | 61 // <dd>The download is currently receiving data from the server.</dd> |
59 // <dt>interrupted</dt> | 62 // <dt>interrupted</dt> |
60 // <dd>An error broke the connection with the file host.</dd> | 63 // <dd>An error broke the connection with the file host.</dd> |
61 // <dt>complete</dt> | 64 // <dt>complete</dt> |
62 // <dd>The download completed successfully.</dd> | 65 // <dd>The download completed successfully.</dd> |
63 // </dl> | 66 // </dl> |
64 // These string constants will never change, however the set of States may | 67 // These string constants will never change, however the set of States may |
65 // change. | 68 // change. |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 // history. | 422 // history. |
420 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase
d. | 423 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase
d. |
421 static void onErased(long downloadId); | 424 static void onErased(long downloadId); |
422 | 425 |
423 // When any of a $ref:DownloadItem's properties | 426 // When any of a $ref:DownloadItem's properties |
424 // except <code>bytesReceived</code> changes, this event fires with the | 427 // except <code>bytesReceived</code> changes, this event fires with the |
425 // <code>downloadId</code> and an object containing the properties that chan
ged. | 428 // <code>downloadId</code> and an object containing the properties that chan
ged. |
426 static void onChanged(DownloadDelta downloadDelta); | 429 static void onChanged(DownloadDelta downloadDelta); |
427 }; | 430 }; |
428 }; | 431 }; |
OLD | NEW |