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

Side by Side Diff: chrome/browser/resources/options/chromeos/internet_options.js

Issue 8623004: Remove the test for mime-type text/plain as this seems to be based on suffix only. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 const ArrayDataModel = cr.ui.ArrayDataModel; 7 const ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // InternetOptions class: 10 // InternetOptions class:
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 chrome.send('disableCellular', []); 83 chrome.send('disableCellular', []);
84 }); 84 });
85 $('change-proxy-button').addEventListener('click', function(event) { 85 $('change-proxy-button').addEventListener('click', function(event) {
86 OptionsPage.closeOverlay(); 86 OptionsPage.closeOverlay();
87 OptionsPage.showPageByName('proxy', false); 87 OptionsPage.showPageByName('proxy', false);
88 chrome.send('coreOptionsUserMetricsAction', 88 chrome.send('coreOptionsUserMetricsAction',
89 ['Options_ShowProxySettings']); 89 ['Options_ShowProxySettings']);
90 }); 90 });
91 $('upload-network-settings').addEventListener('change', function(event) { 91 $('upload-network-settings').addEventListener('change', function(event) {
92 var file = event.target.files[0]; 92 var file = event.target.files[0];
93 if (!file.type.match('text/plain')) {
94 InternetOptions.invalidNetworkSettings();
95 return;
96 }
97
98 var reader = new FileReader(); 93 var reader = new FileReader();
99 reader.onloadend = function(e) { 94 reader.onloadend = function(e) {
100 chrome.send('importNetworkSettings', [this.result]); 95 chrome.send('importNetworkSettings', [this.result]);
101 }; 96 };
102 reader.readAsText(file); 97 reader.readAsText(file);
103 }, false); 98 }, false);
104 $('buyplanDetails').addEventListener('click', function(event) { 99 $('buyplanDetails').addEventListener('click', function(event) {
105 chrome.send('buyDataPlan', []); 100 chrome.send('buyDataPlan', []);
106 OptionsPage.closeOverlay(); 101 OptionsPage.closeOverlay();
107 }); 102 });
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 662
668 InternetOptions.invalidNetworkSettings = function () { 663 InternetOptions.invalidNetworkSettings = function () {
669 alert(localStrings.getString('invalidNetworkSettings')); 664 alert(localStrings.getString('invalidNetworkSettings'));
670 }; 665 };
671 666
672 // Export 667 // Export
673 return { 668 return {
674 InternetOptions: InternetOptions 669 InternetOptions: InternetOptions
675 }; 670 };
676 }); 671 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698