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/app.js

Issue 2517243002: [Sync] Removing complexity around PROXY_TABS now that empty sessions are provided when disabled. (Closed)
Patch Set: Rebase and re-vulcanize after conflict. 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
OLDNEW
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 4
5 cr.define('md_history', function() { 5 cr.define('md_history', function() {
6 var lazyLoadPromise = null; 6 var lazyLoadPromise = null;
7 function ensureLazyLoaded() { 7 function ensureLazyLoaded() {
8 if (!lazyLoadPromise) { 8 if (!lazyLoadPromise) {
9 lazyLoadPromise = new Promise(function(resolve, reject) { 9 lazyLoadPromise = new Promise(function(resolve, reject) {
10 Polymer.Base.importHref( 10 Polymer.Base.importHref(
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 this.focusToolbarSearchField(); 259 this.focusToolbarSearchField();
260 if (e.command.id == 'delete-command') 260 if (e.command.id == 'delete-command')
261 this.deleteSelected(); 261 this.deleteSelected();
262 if (e.command.id == 'toggle-grouped') 262 if (e.command.id == 'toggle-grouped')
263 this.grouped_ = !this.grouped_; 263 this.grouped_ = !this.grouped_;
264 }, 264 },
265 265
266 /** 266 /**
267 * @param {!Array<!ForeignSession>} sessionList Array of objects describing 267 * @param {!Array<!ForeignSession>} sessionList Array of objects describing
268 * the sessions from other devices. 268 * the sessions from other devices.
269 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile?
270 */ 269 */
271 setForeignSessions: function(sessionList, isTabSyncEnabled) { 270 setForeignSessions: function(sessionList) {
272 if (!isTabSyncEnabled) {
273 var syncedDeviceManagerElem =
274 /** @type {HistorySyncedDeviceManagerElement} */this
275 .$$('history-synced-device-manager');
276 if (syncedDeviceManagerElem) {
277 md_history.ensureLazyLoaded().then(function() {
278 syncedDeviceManagerElem.tabSyncDisabled();
279 });
280 }
281 return;
282 }
283
284 this.set('queryResult_.sessionList', sessionList); 271 this.set('queryResult_.sessionList', sessionList);
285 }, 272 },
286 273
287 /** 274 /**
288 * Called when browsing data is cleared. 275 * Called when browsing data is cleared.
289 */ 276 */
290 historyDeleted: function() { 277 historyDeleted: function() {
291 this.$.history.historyDeleted(); 278 this.$.history.historyDeleted();
292 }, 279 },
293 280
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 break; 384 break;
398 } 385 }
399 break; 386 break;
400 } 387 }
401 388
402 md_history.BrowserService.getInstance().recordHistogram( 389 md_history.BrowserService.getInstance().recordHistogram(
403 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END 390 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END
404 ); 391 );
405 }, 392 },
406 }); 393 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/history/other_devices.js ('k') | chrome/browser/resources/md_history/app.crisper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698