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

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

Issue 2200233003: MD History: Refresh the list when clearing browsing data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: consider search term Created 4 years, 4 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
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 // Send the history query immediately. This allows the query to process during 5 // Send the history query immediately. This allows the query to process during
6 // the initial page startup. 6 // the initial page startup.
7 chrome.send('queryHistory', ['', 0, 0, 0, RESULTS_PER_PAGE]); 7 chrome.send('queryHistory', ['', 0, 0, 0, RESULTS_PER_PAGE]);
8 chrome.send('getForeignSessions'); 8 chrome.send('getForeignSessions');
9 9
10 /** @type {Promise} */ 10 /** @type {Promise} */
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 waitForAppUpgrade().then(function() { 78 waitForAppUpgrade().then(function() {
79 /** @type {HistoryAppElement} */($('history-app')) 79 /** @type {HistoryAppElement} */($('history-app'))
80 .setForeignSessions(sessionList, isTabSyncEnabled); 80 .setForeignSessions(sessionList, isTabSyncEnabled);
81 }); 81 });
82 } 82 }
83 83
84 /** 84 /**
85 * Called when the history is deleted by someone else. 85 * Called when the history is deleted by someone else.
86 */ 86 */
87 function historyDeleted() { 87 function historyDeleted() {
88 waitForAppUpgrade().then(function() {
89 // Call into list-container to restore search state.
90 /** @type {HistoryListContainerElement} */($('history-app').$['history'])
Dan Beam 2016/08/04 00:30:46 we really need a lint rule about thing.$.localId
tsergeant 2016/08/04 01:25:55 Yup, please avoid directly accessing local DOM of
Dan Beam 2016/08/04 03:23:44 https://codereview.chromium.org/2209053002/
lshang 2016/08/05 03:39:03 Done.
91 .queryHistory(false);
92 });
88 } 93 }
89 94
90 /** 95 /**
91 * Called by the history backend after user's sign in state changes. 96 * Called by the history backend after user's sign in state changes.
92 * @param {boolean} isUserSignedIn Whether user is signed in or not now. 97 * @param {boolean} isUserSignedIn Whether user is signed in or not now.
93 */ 98 */
94 function updateSignInState(isUserSignedIn) { 99 function updateSignInState(isUserSignedIn) {
95 waitForAppUpgrade().then(function() { 100 waitForAppUpgrade().then(function() {
96 /** @type {HistoryAppElement} */($('history-app')) 101 /** @type {HistoryAppElement} */($('history-app'))
97 .updateSignInState(isUserSignedIn); 102 .updateSignInState(isUserSignedIn);
98 }); 103 });
99 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698