| Index: chrome/browser/resources/snippets_internals.js
|
| diff --git a/chrome/browser/resources/snippets_internals.js b/chrome/browser/resources/snippets_internals.js
|
| index 3cf3560d2ff095c54d029fce7078523c79b5a0c4..7be658a039ea1605cef9046d4eb92cecac8d5fcd 100644
|
| --- a/chrome/browser/resources/snippets_internals.js
|
| +++ b/chrome/browser/resources/snippets_internals.js
|
| @@ -33,6 +33,11 @@ cr.define('chrome.SnippetsInternals', function() {
|
| event.preventDefault();
|
| });
|
|
|
| + $('background-fetch-button').addEventListener('click', function(event) {
|
| + chrome.send('fetchRemoteSuggestionsInTheBackground');
|
| + event.preventDefault();
|
| + });
|
| +
|
| window.addEventListener('focus', refreshContent);
|
| window.setInterval(refreshContent, 1000);
|
|
|
| @@ -108,6 +113,12 @@ cr.define('chrome.SnippetsInternals', function() {
|
| receiveProperty('avg-time-to-use', timeToUse);
|
| }
|
|
|
| + function receiveLastRemoteSuggestionsBackgroundFetchTime(
|
| + lastRemoteSuggestionsBackgroundFetchTime) {
|
| + receiveProperty('last-background-fetch-time-label',
|
| + lastRemoteSuggestionsBackgroundFetchTime);
|
| + }
|
| +
|
| function downloadJson(json) {
|
| // Redirect the browser to download data in |json| as a file "snippets.json"
|
| // (Setting Content-Disposition: attachment via a data: URL is not possible;
|
| @@ -157,6 +168,8 @@ cr.define('chrome.SnippetsInternals', function() {
|
| receiveContentSuggestions: receiveContentSuggestions,
|
| receiveJson: receiveJson,
|
| receiveClassification: receiveClassification,
|
| + receiveLastRemoteSuggestionsBackgroundFetchTime:
|
| + receiveLastRemoteSuggestionsBackgroundFetchTime,
|
| };
|
| });
|
|
|
|
|