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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerManager.js

Issue 2569683003: DevTools: remove deleted registrations from the SW list if a newer version is available. (Closed)
Patch Set: test fixed Created 4 years 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 | « third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js ('k') | 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 return true; 502 return true;
503 } 503 }
504 504
505 /** 505 /**
506 * @return {boolean} 506 * @return {boolean}
507 */ 507 */
508 _shouldBeRemoved() { 508 _shouldBeRemoved() {
509 return this._isRedundant() && (!this.errors.length || this._deleting); 509 return this._isRedundant() && (!this.errors.length || this._deleting);
510 } 510 }
511 511
512 /**
513 * @return {boolean}
514 */
515 canBeRemoved() {
516 return this.isDeleted || this._deleting;
517 }
518
519
512 clearErrors() { 520 clearErrors() {
513 this._fingerprint = Symbol('fingerprint'); 521 this._fingerprint = Symbol('fingerprint');
514 this.errors = []; 522 this.errors = [];
515 } 523 }
516 }; 524 };
517 525
518 /** 526 /**
519 * @unrestricted 527 * @unrestricted
520 */ 528 */
521 SDK.ServiceWorkerContextNamer = class { 529 SDK.ServiceWorkerContextNamer = class {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 */ 604 */
597 _updateContextLabel(context, version) { 605 _updateContextLabel(context, version) {
598 var parsedUrl = context.origin.asParsedURL(); 606 var parsedUrl = context.origin.asParsedURL();
599 var label = parsedUrl ? parsedUrl.lastPathComponentWithFragment() : context. name; 607 var label = parsedUrl ? parsedUrl.lastPathComponentWithFragment() : context. name;
600 if (version) 608 if (version)
601 context.setLabel(label + ' #' + version.id + ' (' + version.status + ')'); 609 context.setLabel(label + ' #' + version.id + ' (' + version.status + ')');
602 else 610 else
603 context.setLabel(label); 611 context.setLabel(label);
604 } 612 }
605 }; 613 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698