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

Side by Side Diff: chrome/browser/resources/options/managed_user_import.js

Issue 165943003: Remove observer when switching from import overlay to create profile overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 /** 9 /**
10 * ManagedUserImportOverlay class. 10 * ManagedUserImportOverlay class.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 self.updateImportInProgress_(false); 59 self.updateImportInProgress_(false);
60 60
61 // 'cancelCreateProfile' is handled by CreateProfileHandler. 61 // 'cancelCreateProfile' is handled by CreateProfileHandler.
62 chrome.send('cancelCreateProfile'); 62 chrome.send('cancelCreateProfile');
63 }; 63 };
64 64
65 $('managed-user-import-ok').onclick = 65 $('managed-user-import-ok').onclick =
66 this.showAvatarGridOrSubmit_.bind(this); 66 this.showAvatarGridOrSubmit_.bind(this);
67 67
68 $('create-new-user-link').onclick = function(event) { 68 $('create-new-user-link').onclick = function(event) {
69 options.ManagedUserListData.removeObserver(self);
69 OptionsPage.navigateToPage('createProfile'); 70 OptionsPage.navigateToPage('createProfile');
70 }; 71 };
71 }, 72 },
72 73
73 /** 74 /**
74 * @override 75 * @override
75 */ 76 */
76 didShowPage: function() { 77 didShowPage: function() {
77 options.ManagedUserListData.requestExistingManagedUsers().then( 78 options.ManagedUserListData.requestExistingManagedUsers().then(
78 this.receiveExistingManagedUsers_, this.onSigninError_.bind(this)); 79 this.receiveExistingManagedUsers_, this.onSigninError_.bind(this));
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 var instance = ManagedUserImportOverlay.getInstance(); 235 var instance = ManagedUserImportOverlay.getInstance();
235 return instance[name + '_'].apply(instance, arguments); 236 return instance[name + '_'].apply(instance, arguments);
236 }; 237 };
237 }); 238 });
238 239
239 // Export 240 // Export
240 return { 241 return {
241 ManagedUserImportOverlay: ManagedUserImportOverlay, 242 ManagedUserImportOverlay: ManagedUserImportOverlay,
242 }; 243 };
243 }); 244 });
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