Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Side by Side Diff: chrome/browser/resources/offline_pages/offline_internals.js

Issue 2820263002: [Offline Prefetch] Create a new JobScheduler task to wake up for net activity. (Closed)
Patch Set: tommycli@ comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cr.define('offlineInternals', function() { 5 cr.define('offlineInternals', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** @type {!Array<OfflinePage>} */ 8 /** @type {!Array<OfflinePage>} */
9 var offlinePages = []; 9 var offlinePages = [];
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (counter == 0) { 285 if (counter == 0) {
286 browserProxy_.getRequestQueue().then(fillRequestQueue); 286 browserProxy_.getRequestQueue().then(fillRequestQueue);
287 } 287 }
288 } else { 288 } else {
289 $('save-url-state').textContent += 289 $('save-url-state').textContent +=
290 saveUrls[i] + ' failed to be added to queue.\n'; 290 saveUrls[i] + ' failed to be added to queue.\n';
291 } 291 }
292 }); 292 });
293 } 293 }
294 }; 294 };
295 $('schedule-nwake').onclick = function() {
296 browserProxy_.scheduleNwake();
297 }
298 $('cancel-nwake').onclick = function() {
299 browserProxy_.cancelNwake();
300 }
295 if (!incognito) 301 if (!incognito)
296 refreshAll(); 302 refreshAll();
297 } 303 }
298 304
299 // Return an object with all of the exports. 305 // Return an object with all of the exports.
300 return { 306 return {
301 initialize: initialize, 307 initialize: initialize,
302 }; 308 };
303 }); 309 });
304 310
305 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); 311 document.addEventListener('DOMContentLoaded', offlineInternals.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698