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 // Use the <code>chrome.downloads</code> API to programmatically initiate, | 5 // Use the <code>chrome.downloads</code> API to programmatically initiate, |
6 // monitor, manipulate, and search for downloads. | 6 // monitor, manipulate, and search for downloads. |
7 [permissions=downloads] | 7 [permissions=downloads] |
8 namespace downloads { | 8 namespace downloads { |
9 [inline_doc] dictionary HeaderNameValuePair { | 9 [inline_doc] dictionary HeaderNameValuePair { |
10 // Name of the HTTP header. | 10 // Name of the HTTP header. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // <dt>url</dt> | 69 // <dt>url</dt> |
70 // <dd>The download's URL is known to be malicious.</dd> | 70 // <dd>The download's URL is known to be malicious.</dd> |
71 // <dt>content</dt> | 71 // <dt>content</dt> |
72 // <dd>The downloaded file is known to be malicious.</dd> | 72 // <dd>The downloaded file is known to be malicious.</dd> |
73 // <dt>uncommon</dt> | 73 // <dt>uncommon</dt> |
74 // <dd>The download's URL is not commonly downloaded and could be | 74 // <dd>The download's URL is not commonly downloaded and could be |
75 // dangerous.</dd> | 75 // dangerous.</dd> |
76 // <dt>host</dt> | 76 // <dt>host</dt> |
77 // <dd>The download came from a host known to distribute malicious | 77 // <dd>The download came from a host known to distribute malicious |
78 // binaries and is likely dangerous.</dd> | 78 // binaries and is likely dangerous.</dd> |
| 79 // <dt>unwanted</dt> |
| 80 // <dd>The download is potentially unwanted or unsafe. E.g. it could make |
| 81 // changes to browser or system settings.</dd> |
79 // <dt>safe</dt> | 82 // <dt>safe</dt> |
80 // <dd>The download presents no known danger to the user's computer.</dd> | 83 // <dd>The download presents no known danger to the user's computer.</dd> |
81 // <dt>accepted</dt> | 84 // <dt>accepted</dt> |
82 // <dd>The user has accepted the dangerous download.</dd> | 85 // <dd>The user has accepted the dangerous download.</dd> |
83 // </dl> | 86 // </dl> |
84 enum DangerType {file, url, content, uncommon, host, safe, accepted}; | 87 enum DangerType {file, url, content, uncommon, host, unwanted, safe, accepted}
; |
85 | 88 |
86 // <dl><dt>in_progress</dt> | 89 // <dl><dt>in_progress</dt> |
87 // <dd>The download is currently receiving data from the server.</dd> | 90 // <dd>The download is currently receiving data from the server.</dd> |
88 // <dt>interrupted</dt> | 91 // <dt>interrupted</dt> |
89 // <dd>An error broke the connection with the file host.</dd> | 92 // <dd>An error broke the connection with the file host.</dd> |
90 // <dt>complete</dt> | 93 // <dt>complete</dt> |
91 // <dd>The download completed successfully.</dd> | 94 // <dd>The download completed successfully.</dd> |
92 // </dl> | 95 // </dl> |
93 enum State {in_progress, interrupted, complete}; | 96 enum State {in_progress, interrupted, complete}; |
94 | 97 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // <code>suggestion</code> object to <code>suggest</code> wins. In order to | 473 // <code>suggestion</code> object to <code>suggest</code> wins. In order to |
471 // avoid confusion regarding which extension will win, users should not | 474 // avoid confusion regarding which extension will win, users should not |
472 // install extensions that may conflict. If the download is initiated by | 475 // install extensions that may conflict. If the download is initiated by |
473 // $ref:download and the target filename is known before the MIME type and | 476 // $ref:download and the target filename is known before the MIME type and |
474 // tentative filename have been determined, pass <code>filename</code> to | 477 // tentative filename have been determined, pass <code>filename</code> to |
475 // $ref:download instead. | 478 // $ref:download instead. |
476 [maxListeners=1] static void onDeterminingFilename( | 479 [maxListeners=1] static void onDeterminingFilename( |
477 DownloadItem downloadItem, SuggestFilenameCallback suggest); | 480 DownloadItem downloadItem, SuggestFilenameCallback suggest); |
478 }; | 481 }; |
479 }; | 482 }; |
OLD | NEW |