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

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

Issue 2618603003: arc: Restore UMA statistics for failures in LSO flow. (Closed)
Patch Set: Created 3 years, 11 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 | « chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc ('k') | 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 * Chrome window that hosts UI. Only one window is allowed. 6 * Chrome window that hosts UI. Only one window is allowed.
7 * @type {chrome.app.window.AppWindow} 7 * @type {chrome.app.window.AppWindow}
8 */ 8 */
9 var appWindow = null; 9 var appWindow = null;
10 10
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 return; 668 return;
669 } 669 }
670 670
671 lsoView.executeScript({code: 'document.title;'}, function(results) { 671 lsoView.executeScript({code: 'document.title;'}, function(results) {
672 var authCodePrefix = 'Success code='; 672 var authCodePrefix = 'Success code=';
673 if (results && results.length == 1 && typeof results[0] == 'string' && 673 if (results && results.length == 1 && typeof results[0] == 'string' &&
674 results[0].substring(0, authCodePrefix.length) == authCodePrefix) { 674 results[0].substring(0, authCodePrefix.length) == authCodePrefix) {
675 var authCode = results[0].substring(authCodePrefix.length); 675 var authCode = results[0].substring(authCodePrefix.length);
676 sendNativeMessage('onAuthSucceeded', {code: authCode}); 676 sendNativeMessage('onAuthSucceeded', {code: authCode});
677 } else { 677 } else {
678 showErrorMessage( 678 sendNativeMessage('onAuthFailed');
679 showErrorPage(
679 appWindow.contentWindow.loadTimeData.getString( 680 appWindow.contentWindow.loadTimeData.getString(
680 'authorizationFailed')); 681 'authorizationFailed'));
681 } 682 }
682 }); 683 });
683 }; 684 };
684 685
685 var requestFilter = { 686 var requestFilter = {
686 urls: ['<all_urls>'], 687 urls: ['<all_urls>'],
687 types: ['main_frame'] 688 types: ['main_frame']
688 }; 689 };
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 type: 'chrome', 746 type: 'chrome',
746 color: '#ffffff' 747 color: '#ffffff'
747 }, 748 },
748 'innerBounds': { 749 'innerBounds': {
749 'width': INNER_WIDTH, 750 'width': INNER_WIDTH,
750 'height': INNER_HEIGHT 751 'height': INNER_HEIGHT
751 } 752 }
752 }; 753 };
753 chrome.app.window.create('main.html', options, onWindowCreated); 754 chrome.app.window.create('main.html', options, onWindowCreated);
754 }); 755 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698