Chromium Code Reviews| Index: chrome/browser/resources/offline_pages/offline_internals.js |
| diff --git a/chrome/browser/resources/offline_pages/offline_internals.js b/chrome/browser/resources/offline_pages/offline_internals.js |
| index b01b0a322cf1250841f09c6472edee9fcb4855fa..c7c0ae0e30d539ecad7d41f04cfe3eb0d9d500a3 100644 |
| --- a/chrome/browser/resources/offline_pages/offline_internals.js |
| +++ b/chrome/browser/resources/offline_pages/offline_internals.js |
| @@ -178,6 +178,14 @@ cr.define('offlineInternals', function() { |
| browserProxy.getRequestQueue().then(fillRequestQueue); |
| } |
| + /** |
| + * Callback for prefetch actins. |
| + * @param {!IsLogging} logStatus Status of logging. |
|
dpapad
2017/06/12 23:29:20
I don't think this passes compilation. The paramet
jianli
2017/06/12 23:48:15
Done.
|
| + */ |
| + function setPrefetchResult(info) { |
| + $('prefetch-actions-info').textContent = info; |
| + } |
| + |
| /** |
| * Downloads all the stored page and request queue information into a file. |
| * TODO(chili): Create a CSV writer that can abstract out the line joining. |
| @@ -317,10 +325,18 @@ cr.define('offlineInternals', function() { |
| } |
| }; |
| $('schedule-nwake').onclick = function() { |
| - browserProxy.scheduleNwake(); |
| + browserProxy.scheduleNwake().then(setPrefetchResult); |
| }; |
| $('cancel-nwake').onclick = function() { |
| - browserProxy.cancelNwake(); |
| + browserProxy.cancelNwake().then(setPrefetchResult); |
| + }; |
| + $('generate-page-bundle').onclick = function() { |
| + browserProxy.generatePageBundle($('generate-urls').value). |
| + then(setPrefetchResult); |
| + }; |
| + $('get-operation').onclick = function() { |
| + browserProxy.getOperation($('operation-name').value). |
| + then(setPrefetchResult); |
| }; |
| if (!incognito) |
| refreshAll(); |