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

Side by Side Diff: chrome/browser/resources/popular_sites_internals.js

Issue 1851803002: [NTP Popular Sites] Store country/version in prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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('chrome.popular_sites_internals', function() { 5 cr.define('chrome.popular_sites_internals', function() {
6 'use strict'; 6 'use strict';
7 7
8 function initialize() { 8 function initialize() {
9 function submitDownload(event) { 9 function submitDownload(event) {
10 $('download-result').textContent = ''; 10 $('download-result').textContent = '';
(...skipping 14 matching lines...) Expand all
25 $('view-json').addEventListener('click', viewJson); 25 $('view-json').addEventListener('click', viewJson);
26 26
27 chrome.send('registerForEvents'); 27 chrome.send('registerForEvents');
28 } 28 }
29 29
30 function receiveDownloadResult(result) { 30 function receiveDownloadResult(result) {
31 $('download-result').textContent = result; 31 $('download-result').textContent = result;
32 } 32 }
33 33
34 function receiveSites(sites) { 34 function receiveSites(sites) {
35 jstProcess(new JsEvalContext(sites), $('sites')); 35 jstProcess(new JsEvalContext(sites), $('info'));
36 // Also clear the json string, since it's likely stale now. 36 // Also clear the json string, since it's likely stale now.
37 $('json-value').textContent = ''; 37 $('json-value').textContent = '';
38 } 38 }
39 39
40 function receiveJson(json) { 40 function receiveJson(json) {
41 $('json-value').textContent = json; 41 $('json-value').textContent = json;
42 } 42 }
43 43
44 // Return an object with all of the exports. 44 // Return an object with all of the exports.
45 return { 45 return {
46 initialize: initialize, 46 initialize: initialize,
47 receiveDownloadResult: receiveDownloadResult, 47 receiveDownloadResult: receiveDownloadResult,
48 receiveSites: receiveSites, 48 receiveSites: receiveSites,
49 receiveJson: receiveJson, 49 receiveJson: receiveJson,
50 }; 50 };
51 }); 51 });
52 52
53 document.addEventListener('DOMContentLoaded', 53 document.addEventListener('DOMContentLoaded',
54 chrome.popular_sites_internals.initialize); 54 chrome.popular_sites_internals.initialize);
55 55
OLDNEW
« no previous file with comments | « chrome/browser/resources/popular_sites_internals.html ('k') | chrome/browser/supervised_user/supervised_user_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698