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

Side by Side Diff: chrome/browser/resources/md_extensions/service.js

Issue 2769293002: [MD Extensions] Include the manifest code snippet in load errors (Closed)
Patch Set: . Created 3 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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('extensions', function() { 5 cr.define('extensions', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * @constructor 9 * @constructor
10 * @implements {extensions.ErrorPageDelegate} 10 * @implements {extensions.ErrorPageDelegate}
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 }, 246 },
247 247
248 /** @override */ 248 /** @override */
249 setProfileInDevMode: function(inDevMode) { 249 setProfileInDevMode: function(inDevMode) {
250 chrome.developerPrivate.updateProfileConfiguration( 250 chrome.developerPrivate.updateProfileConfiguration(
251 {inDeveloperMode: inDevMode}); 251 {inDeveloperMode: inDevMode});
252 }, 252 },
253 253
254 /** @override */ 254 /** @override */
255 loadUnpacked: function() { 255 loadUnpacked: function() {
256 chrome.developerPrivate.loadUnpacked({failQuietly: true}, () => { 256 chrome.developerPrivate.loadUnpacked(
257 // TODO(devlin): Show the load error dialog if something went wrong. 257 {failQuietly: true, populateError: true}, (loadError) => {
michaelpg 2017/03/24 02:59:02 nit: start the lambda on its own line, so it stand
Devlin 2017/03/24 16:03:08 Done.
258 if (chrome.runtime.lastError) {
259 // The lastError here is just that the user closed the dialog.
michaelpg 2017/03/24 02:59:02 assert(lastError matches what you expect) in addit
Devlin 2017/03/24 16:03:08 Done.
260 return;
261 }
262 if (loadError) {
263 this.manager_.loadError.set('loadError', loadError);
264 this.manager_.loadError.show();
265 }
258 }); 266 });
259 }, 267 },
260 268
261 /** @override */ 269 /** @override */
262 retryLoadUnpacked: function() { 270 retryLoadUnpacked: function() {
263 // TODO(devlin): Implement this. 271 // TODO(devlin): Implement this.
264 }, 272 },
265 273
266 /** @override */ 274 /** @override */
267 choosePackRootDirectory: function() { 275 choosePackRootDirectory: function() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 resolve(code); 311 resolve(code);
304 }); 312 });
305 }); 313 });
306 }, 314 },
307 }; 315 };
308 316
309 cr.addSingletonGetter(Service); 317 cr.addSingletonGetter(Service);
310 318
311 return {Service: Service}; 319 return {Service: Service};
312 }); 320 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698