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

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

Issue 1927993002: Allow dumping raw json fetched from the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some fixes Created 4 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('chrome.SnippetsInternals', function() { 5 cr.define('chrome.SnippetsInternals', function() {
6 'use strict'; 6 'use strict';
7 7
8 function initialize() { 8 function initialize() {
9 $('submit-download').addEventListener('click', function(event) { 9 $('submit-download').addEventListener('click', function(event) {
10 chrome.send('download', [$('hosts-input').value]); 10 chrome.send('download',
11 [$('hosts-input').value, $('download-dump').checked]);
11 event.preventDefault(); 12 event.preventDefault();
12 }); 13 });
13 14
14 $('submit-clear').addEventListener('click', function(event) { 15 $('submit-clear').addEventListener('click', function(event) {
15 chrome.send('clear'); 16 chrome.send('clear');
16 event.preventDefault(); 17 event.preventDefault();
17 }); 18 });
18 19
19 $('submit-dump').addEventListener('click', function(event) { 20 $('submit-dump').addEventListener('click', function(event) {
20 chrome.send('dump'); 21 chrome.send('dump');
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 receiveProperty: receiveProperty, 93 receiveProperty: receiveProperty,
93 receiveHosts: receiveHosts, 94 receiveHosts: receiveHosts,
94 receiveSnippets: receiveSnippets, 95 receiveSnippets: receiveSnippets,
95 receiveDiscardedSnippets: receiveDiscardedSnippets, 96 receiveDiscardedSnippets: receiveDiscardedSnippets,
96 receiveJson: receiveJson, 97 receiveJson: receiveJson,
97 }; 98 };
98 }); 99 });
99 100
100 document.addEventListener('DOMContentLoaded', 101 document.addEventListener('DOMContentLoaded',
101 chrome.SnippetsInternals.initialize); 102 chrome.SnippetsInternals.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698