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

Unified Diff: chrome/browser/resources/md_extensions/code_section.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_extensions/code_section.js
diff --git a/chrome/browser/resources/md_extensions/code_section.js b/chrome/browser/resources/md_extensions/code_section.js
index d0a93e2aac26986641c78f2ba764867322b36546..939e433b63be9798a795528b56db3145b4c42ebe 100644
--- a/chrome/browser/resources/md_extensions/code_section.js
+++ b/chrome/browser/resources/md_extensions/code_section.js
@@ -48,11 +48,13 @@ cr.define('extensions', function() {
},
/**
+ * Returns true if no code could be displayed.
michaelpg 2017/03/24 02:59:01 As above, I'm asking myself *why* the code couldn'
Devlin 2017/03/24 16:03:08 added "e.g. because the file could not be loaded."
* @return {boolean}
- * @private
*/
- isMainHidden_: function() {
- return !this.code;
+ isEmpty: function() {
michaelpg 2017/03/24 02:59:01 nit: move above @private method
Devlin 2017/03/24 16:03:08 Done.
+ return !this.code ||
+ (!this.code.beforeHighlight && !this.code.highlight &&
+ !this.code.afterHighlight);
},
});

Powered by Google App Engine
This is Rietveld 408576698