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

Side by Side Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 2839693003: MD Settings: Fix networking config errors (Closed)
Patch Set: Feedback 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/internet_page/internet_subpage.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-internet-detail' is the settings subpage containing details 7 * 'settings-internet-detail' is the settings subpage containing details
8 * for a network. 8 * for a network.
9 */ 9 */
10 (function() { 10 (function() {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 this.guid, this.getPropertiesCallback_.bind(this)); 260 this.guid, this.getPropertiesCallback_.bind(this));
261 } 261 }
262 }, 262 },
263 263
264 /** 264 /**
265 * networkingPrivate.getProperties callback. 265 * networkingPrivate.getProperties callback.
266 * @param {CrOnc.NetworkProperties} properties The network properties. 266 * @param {CrOnc.NetworkProperties} properties The network properties.
267 * @private 267 * @private
268 */ 268 */
269 getPropertiesCallback_: function(properties) { 269 getPropertiesCallback_: function(properties) {
270 if (chrome.runtime.lastError) {
271 var message = chrome.runtime.lastError.message;
272 if (message == 'Error.InvalidNetworkGuid') {
273 console.error('Details page: GUID no longer exists: ' + this.guid);
274 } else {
275 console.error(
276 'Unexpected networkingPrivate.getManagedProperties error: ' +
277 message + ' For: ' + this.guid);
278 }
279 this.close_();
280 return;
281 }
282 if (!properties) {
283 console.error('No properties for: ' + this.guid);
284 this.close_();
285 return;
286 }
270 this.networkProperties = properties; 287 this.networkProperties = properties;
271 if (!properties) {
272 // If |properties| is null, the network is no longer visible, close this.
273 console.error('Network no longer exists: ' + this.guid);
274 this.close_();
275 }
276 }, 288 },
277 289
278 /** 290 /**
279 * networkingPrivate.getState callback. 291 * networkingPrivate.getState callback.
280 * @param {CrOnc.NetworkStateProperties} state The network state properties. 292 * @param {CrOnc.NetworkStateProperties} state The network state properties.
281 * @private 293 * @private
282 */ 294 */
283 getStateCallback_: function(state) { 295 getStateCallback_: function(state) {
284 if (!state) { 296 if (!state) {
285 // If |state| is null, the network is no longer visible, close this. 297 // If |state| is null, the network is no longer visible, close this.
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 */ 937 */
926 allPropertiesMatch_: function(curValue, newValue) { 938 allPropertiesMatch_: function(curValue, newValue) {
927 for (var key in newValue) { 939 for (var key in newValue) {
928 if (newValue[key] != curValue[key]) 940 if (newValue[key] != curValue[key])
929 return false; 941 return false;
930 } 942 }
931 return true; 943 return true;
932 } 944 }
933 }); 945 });
934 })(); 946 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/internet_page/internet_subpage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698