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

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: Reverted ios change. Created 4 years, 1 month 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 onCommand_: function(e) { 257 onCommand_: function(e) {
258 if (e.command.id == 'find-command' || e.command.id == 'slash-command') 258 if (e.command.id == 'find-command' || e.command.id == 'slash-command')
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 }, 262 },
263 263
264 /** 264 /**
265 * @param {!Array<!ForeignSession>} sessionList Array of objects describing 265 * @param {!Array<!ForeignSession>} sessionList Array of objects describing
266 * the sessions from other devices. 266 * the sessions from other devices.
267 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile?
268 */ 267 */
269 setForeignSessions: function(sessionList, isTabSyncEnabled) { 268 setForeignSessions: function(sessionList) {
270 if (!isTabSyncEnabled) {
271 var syncedDeviceManagerElem =
272 /** @type {HistorySyncedDeviceManagerElement} */this
273 .$$('history-synced-device-manager');
274 if (syncedDeviceManagerElem) {
275 md_history.ensureLazyLoaded().then(function() {
276 syncedDeviceManagerElem.tabSyncDisabled();
calamity 2016/11/24 00:29:09 Delete this in synced_device_manager.js
skym 2016/11/29 18:30:55 Done.
277 });
278 }
279 return;
280 }
281
282 this.set('queryResult_.sessionList', sessionList); 269 this.set('queryResult_.sessionList', sessionList);
283 }, 270 },
284 271
285 /** 272 /**
286 * Called when browsing data is cleared. 273 * Called when browsing data is cleared.
287 */ 274 */
288 historyDeleted: function() { 275 historyDeleted: function() {
289 this.$.history.historyDeleted(); 276 this.$.history.historyDeleted();
290 }, 277 },
291 278
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 break; 382 break;
396 } 383 }
397 break; 384 break;
398 } 385 }
399 386
400 md_history.BrowserService.getInstance().recordHistogram( 387 md_history.BrowserService.getInstance().recordHistogram(
401 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END 388 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END
402 ); 389 );
403 }, 390 },
404 }); 391 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/vulcanized.html ('k') | chrome/browser/resources/md_history/app.crisper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698