| OLD | NEW |
| 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 function PromiseResolver() { | 4 function PromiseResolver() { |
| 5 this.resolve_; | 5 this.resolve_; |
| 6 this.reject_; | 6 this.reject_; |
| 7 this.promise_ = new Promise(function(resolve, reject) { | 7 this.promise_ = new Promise(function(resolve, reject) { |
| 8 this.resolve_ = resolve; | 8 this.resolve_ = resolve; |
| 9 this.reject_ = reject; | 9 this.reject_ = reject; |
| 10 }.bind(this)); | 10 }.bind(this)); |
| (...skipping 4847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4858 var menu = assert(this.$.sharedMenu.getIfExists()); | 4858 var menu = assert(this.$.sharedMenu.getIfExists()); |
| 4859 this.set('queryState.searchTerm', menu.itemData.item.domain); | 4859 this.set('queryState.searchTerm', menu.itemData.item.domain); |
| 4860 menu.closeMenu(); | 4860 menu.closeMenu(); |
| 4861 }, | 4861 }, |
| 4862 onRemoveFromHistoryTap_: function() { | 4862 onRemoveFromHistoryTap_: function() { |
| 4863 var browserService = md_history.BrowserService.getInstance(); | 4863 var browserService = md_history.BrowserService.getInstance(); |
| 4864 browserService.recordAction('EntryMenuRemoveFromHistory'); | 4864 browserService.recordAction('EntryMenuRemoveFromHistory'); |
| 4865 var menu = assert(this.$.sharedMenu.getIfExists()); | 4865 var menu = assert(this.$.sharedMenu.getIfExists()); |
| 4866 var itemData = menu.itemData; | 4866 var itemData = menu.itemData; |
| 4867 browserService.deleteItems([ itemData.item ]).then(function(items) { | 4867 browserService.deleteItems([ itemData.item ]).then(function(items) { |
| 4868 this.fire('unselect-all'); |
| 4868 this.getSelectedList_().removeItemsByPath([ itemData.path ]); | 4869 this.getSelectedList_().removeItemsByPath([ itemData.path ]); |
| 4869 this.fire('unselect-all'); | |
| 4870 var index = itemData.index; | 4870 var index = itemData.index; |
| 4871 if (index == undefined) return; | 4871 if (index == undefined) return; |
| 4872 var browserService = md_history.BrowserService.getInstance(); | 4872 var browserService = md_history.BrowserService.getInstance(); |
| 4873 browserService.recordHistogram('HistoryPage.RemoveEntryPosition', index, U
MA_MAX_BUCKET_VALUE); | 4873 browserService.recordHistogram('HistoryPage.RemoveEntryPosition', index, U
MA_MAX_BUCKET_VALUE); |
| 4874 if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) { | 4874 if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) { |
| 4875 browserService.recordHistogram('HistoryPage.RemoveEntryPositionSubset',
index, UMA_MAX_SUBSET_BUCKET_VALUE); | 4875 browserService.recordHistogram('HistoryPage.RemoveEntryPositionSubset',
index, UMA_MAX_SUBSET_BUCKET_VALUE); |
| 4876 } | 4876 } |
| 4877 }.bind(this)); | 4877 }.bind(this)); |
| 4878 menu.closeMenu(); | 4878 menu.closeMenu(); |
| 4879 }, | 4879 }, |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5517 | 5517 |
| 5518 case HistoryRange.MONTH: | 5518 case HistoryRange.MONTH: |
| 5519 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; | 5519 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; |
| 5520 break; | 5520 break; |
| 5521 } | 5521 } |
| 5522 break; | 5522 break; |
| 5523 } | 5523 } |
| 5524 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); | 5524 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); |
| 5525 } | 5525 } |
| 5526 }); | 5526 }); |
| OLD | NEW |