| Index: third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
|
| index beadea7daadbf5568c36bb15f43b54adf7aed6c2..79eb624f1ba576f9172601921fd9fea2f365b510 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
|
| @@ -17,6 +17,26 @@ Persistence.PersistenceUtils = class {
|
| return Common.UIString('Linked to source map: %s', binding.network.url().trimMiddle(150));
|
| return Common.UIString('Linked to %s', binding.network.url().trimMiddle(150));
|
| }
|
| +
|
| + /**
|
| + * @param {!Workspace.UISourceCode} uiSourceCode
|
| + * @return {?UI.Icon}
|
| + */
|
| + static iconForUISourceCode(uiSourceCode) {
|
| + if (!Runtime.experiments.isEnabled('persistence2'))
|
| + return null;
|
| + var binding = Persistence.persistence.binding(uiSourceCode);
|
| + if (binding) {
|
| + var icon = UI.Icon.create('smallicon-file-sync');
|
| + icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(binding.fileSystem);
|
| + return icon;
|
| + }
|
| + if (uiSourceCode.project().type() !== Workspace.projectTypes.FileSystem)
|
| + return null;
|
| + var icon = UI.Icon.create('smallicon-file');
|
| + icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(uiSourceCode);
|
| + return icon;
|
| + }
|
| };
|
|
|
| /**
|
| @@ -47,11 +67,6 @@ Persistence.PersistenceUtils.LinkDecorator = class extends Common.Object {
|
| * @return {?UI.Icon}
|
| */
|
| linkIcon(uiSourceCode) {
|
| - var binding = Persistence.persistence.binding(uiSourceCode);
|
| - if (!binding)
|
| - return null;
|
| - var icon = UI.Icon.create('smallicon-green-checkmark');
|
| - icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(uiSourceCode);
|
| - return icon;
|
| + return Persistence.PersistenceUtils.iconForUISourceCode(uiSourceCode);
|
| }
|
| };
|
|
|