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

Side by Side Diff: chrome/browser/resources/history/history.js

Issue 970213002: [History] Set |deleteCompleteCallback_| before calling -removeVisits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="history_focus_manager.js"> 6 <include src="history_focus_manager.js">
7 7
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 /** @const */ var RESULTS_PER_PAGE = 150; 10 /** @const */ var RESULTS_PER_PAGE = 150;
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 assert(this.deletingHistoryAllowed); 703 assert(this.deletingHistoryAllowed);
704 704
705 var toBeRemoved = []; 705 var toBeRemoved = [];
706 for (var i = 0; i < visits.length; i++) { 706 for (var i = 0; i < visits.length; i++) {
707 toBeRemoved.push({ 707 toBeRemoved.push({
708 url: visits[i].url_, 708 url: visits[i].url_,
709 timestamps: visits[i].allTimestamps 709 timestamps: visits[i].allTimestamps
710 }); 710 });
711 } 711 }
712 712
713 this.deleteCompleteCallback_ = callback;
713 chrome.send('removeVisits', toBeRemoved); 714 chrome.send('removeVisits', toBeRemoved);
714 this.deleteCompleteCallback_ = callback;
715 }; 715 };
716 716
717 /** @return {boolean} Whether the model is currently deleting a visit. */ 717 /** @return {boolean} Whether the model is currently deleting a visit. */
718 HistoryModel.prototype.isDeletingVisits = function() { 718 HistoryModel.prototype.isDeletingVisits = function() {
719 return !!this.deleteCompleteCallback_; 719 return !!this.deleteCompleteCallback_;
720 }; 720 };
721 721
722 /** 722 /**
723 * Called when visits have been succesfully removed from the history. 723 * Called when visits have been succesfully removed from the history.
724 */ 724 */
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 historyView.reload(); 2398 historyView.reload();
2399 } 2399 }
2400 2400
2401 // Add handlers to HTML elements. 2401 // Add handlers to HTML elements.
2402 document.addEventListener('DOMContentLoaded', load); 2402 document.addEventListener('DOMContentLoaded', load);
2403 2403
2404 // This event lets us enable and disable menu items before the menu is shown. 2404 // This event lets us enable and disable menu items before the menu is shown.
2405 document.addEventListener('canExecute', function(e) { 2405 document.addEventListener('canExecute', function(e) {
2406 e.canExecute = true; 2406 e.canExecute = true;
2407 }); 2407 });
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