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

Side by Side Diff: chrome/browser/resources/chromeos/arc_support/background.js

Issue 2413203003: Fix unexpected metrics preference resetting. (Closed)
Patch Set: Created 4 years, 2 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 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 /** 5 /**
6 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage 6 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage
7 * enum. 7 * enum.
8 * @type {Array<string>} 8 * @type {Array<string>}
9 */ 9 */
10 var UI_PAGES = ['none', 10 var UI_PAGES = ['none',
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 chrome.browser.openTab({'url': event.targetUrl}, function() {}); 568 chrome.browser.openTab({'url': event.targetUrl}, function() {});
569 }); 569 });
570 570
571 var onAgree = function() { 571 var onAgree = function() {
572 termsAccepted = true; 572 termsAccepted = true;
573 573
574 var enableMetrics = doc.getElementById('enable-metrics'); 574 var enableMetrics = doc.getElementById('enable-metrics');
575 var enableBackupRestore = doc.getElementById('enable-backup-restore'); 575 var enableBackupRestore = doc.getElementById('enable-backup-restore');
576 var enableLocationService = doc.getElementById('enable-location-service'); 576 var enableLocationService = doc.getElementById('enable-location-service');
577 sendNativeMessage('onAgreed', { 577 sendNativeMessage('onAgreed', {
578 isMetricsEnabled: !enableMetrics.hidden && enableMetrics.checked, 578 isMetricsEnabled: enableMetrics.checked,
579 isBackupRestoreEnabled: enableBackupRestore.checked, 579 isBackupRestoreEnabled: enableBackupRestore.checked,
580 isLocationServiceEnabled: enableLocationService.checked 580 isLocationServiceEnabled: enableLocationService.checked
581 }); 581 });
582 }; 582 };
583 583
584 var onCancel = function() { 584 var onCancel = function() {
585 if (appWindow) { 585 if (appWindow) {
586 appWindow.close(); 586 appWindow.close();
587 } 587 }
588 }; 588 };
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 type: 'chrome', 646 type: 'chrome',
647 color: '#ffffff' 647 color: '#ffffff'
648 }, 648 },
649 'innerBounds': { 649 'innerBounds': {
650 'width': INNER_WIDTH, 650 'width': INNER_WIDTH,
651 'height': INNER_HEIGHT 651 'height': INNER_HEIGHT
652 } 652 }
653 }; 653 };
654 chrome.app.window.create('main.html', options, onWindowCreated); 654 chrome.app.window.create('main.html', options, onWindowCreated);
655 }); 655 });
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