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

Side by Side Diff: chrome/browser/resources/print_preview/data/user_info.js

Issue 14370003: Use device Robot Account to access Cloud Print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Repository which stores information about the user. Events are dispatched 9 * Repository which stores information about the user. Events are dispatched
10 * when the information changes. 10 * when the information changes.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 this.tracker_.removeAll(); 65 this.tracker_.removeAll();
66 }, 66 },
67 67
68 /** 68 /**
69 * Called when a Google Cloud Print printer search completes. Updates user 69 * Called when a Google Cloud Print printer search completes. Updates user
70 * information. 70 * information.
71 * @type {cr.Event} event Contains information about the logged in user. 71 * @type {cr.Event} event Contains information about the logged in user.
72 * @private 72 * @private
73 */ 73 */
74 onCloudPrintSearchDone_: function(event) { 74 onCloudPrintSearchDone_: function(event) {
75 this.userEmail_ = event.email; 75 if (event.origin == print_preview.Destination.Origin.COOKIES) {
76 cr.dispatchSimpleEvent(this, UserInfo.EventType.EMAIL_CHANGE); 76 this.userEmail_ = event.email;
77 cr.dispatchSimpleEvent(this, UserInfo.EventType.EMAIL_CHANGE);
78 }
77 } 79 }
78 }; 80 };
79 81
80 return { 82 return {
81 UserInfo: UserInfo 83 UserInfo: UserInfo
82 }; 84 };
83 }); 85 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698