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

Side by Side Diff: chrome/browser/resources/mobile_setup.js

Issue 4169001: Rewritten parts of NetworkLibrary to work around memory corruption that prev... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 cr.define('mobile', function() { 6 cr.define('mobile', function() {
7 7
8 function MobileSetup() { 8 function MobileSetup() {
9 } 9 }
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 switch(new_state) { 88 switch(new_state) {
89 case MobileSetup.PLAN_ACTIVATION_LOADING: 89 case MobileSetup.PLAN_ACTIVATION_LOADING:
90 case MobileSetup.PLAN_ACTIVATION_START: 90 case MobileSetup.PLAN_ACTIVATION_START:
91 $('statusHeader').textContent = 91 $('statusHeader').textContent =
92 MobileSetup.localStrings_.getString('connecting_header'); 92 MobileSetup.localStrings_.getString('connecting_header');
93 $('errorMessage').textContent = ''; 93 $('errorMessage').textContent = '';
94 $('paymentForm').classList.add('hidden'); 94 $('paymentForm').classList.add('hidden');
95 $('finalMessage').classList.add('hidden'); 95 $('finalMessage').classList.add('hidden');
96 $('errorMessage').classList.add('hidden'); 96 $('errorMessage').classList.add('hidden');
97 $('systemStatus').classList.remove('hidden'); 97 $('systemStatus').classList.remove('hidden');
98 break;
98 case MobileSetup.PLAN_ACTIVATION_INITIATING_ACTIVATION: 99 case MobileSetup.PLAN_ACTIVATION_INITIATING_ACTIVATION:
99 case MobileSetup.PLAN_ACTIVATION_ACTIVATING: 100 case MobileSetup.PLAN_ACTIVATION_ACTIVATING:
100 $('statusHeader').textContent = 101 $('statusHeader').textContent =
101 MobileSetup.localStrings_.getString('activating_header'); 102 MobileSetup.localStrings_.getString('activating_header');
102 $('errorMessage').textContent = ''; 103 $('errorMessage').textContent = '';
103 $('paymentForm').classList.add('hidden'); 104 $('paymentForm').classList.add('hidden');
104 $('finalMessage').classList.add('hidden'); 105 $('finalMessage').classList.add('hidden');
105 $('errorMessage').classList.add('hidden'); 106 $('errorMessage').classList.add('hidden');
106 $('systemStatus').classList.remove('hidden'); 107 $('systemStatus').classList.remove('hidden');
107 break; 108 break;
(...skipping 11 matching lines...) Expand all
119 $('statusHeader').textContent = 120 $('statusHeader').textContent =
120 MobileSetup.localStrings_.getString('error_header'); 121 MobileSetup.localStrings_.getString('error_header');
121 $('errorMessage').textContent = deviceInfo.error; 122 $('errorMessage').textContent = deviceInfo.error;
122 $('paymentForm').classList.add('hidden'); 123 $('paymentForm').classList.add('hidden');
123 $('finalMessage').classList.add('hidden'); 124 $('finalMessage').classList.add('hidden');
124 $('errorMessage').classList.remove('hidden'); 125 $('errorMessage').classList.remove('hidden');
125 $('systemStatus').classList.remove('hidden'); 126 $('systemStatus').classList.remove('hidden');
126 break; 127 break;
127 } 128 }
128 this.state_ = new_state; 129 this.state_ = new_state;
129 $('statusHeader').textContent =
130 $('statusHeader').textContent + ' (state = ' + new_state + ')';
131 }, 130 },
132 131
133 updateDeviceStatus_: function(deviceInfo) { 132 updateDeviceStatus_: function(deviceInfo) {
134 this.changeState_(deviceInfo); 133 this.changeState_(deviceInfo);
135 }, 134 },
136 135
137 sendDeviceInfo_ : function() { 136 sendDeviceInfo_ : function() {
138 var msg = { 137 var msg = {
139 type: 'deviceInfoMsg', 138 type: 'deviceInfoMsg',
140 domain: document.location, 139 domain: document.location,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 mobile.MobileSetup.getInstance().initialize('paymentForm'); 196 mobile.MobileSetup.getInstance().initialize('paymentForm');
198 }; 197 };
199 198
200 // Export 199 // Export
201 return { 200 return {
202 MobileSetup: MobileSetup 201 MobileSetup: MobileSetup
203 }; 202 };
204 203
205 }); 204 });
206 205
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698