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

Unified Diff: content/renderer/manifest/manifest_parser.h

Issue 1932623003: DevTools: Introduce Page.getManifest remote debugging protocol method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser test updated Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/manifest/manifest_manager.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_parser.h
diff --git a/content/renderer/manifest/manifest_parser.h b/content/renderer/manifest/manifest_parser.h
index 5ec7f511ec0024d378b372d6b3cc382c30ca0e6d..0f12c5a474566306c2947aefb33f3aa18b7dc947 100644
--- a/content/renderer/manifest/manifest_parser.h
+++ b/content/renderer/manifest/manifest_parser.h
@@ -14,6 +14,7 @@
#include "base/strings/string_piece.h"
#include "content/common/content_export.h"
#include "content/public/common/manifest.h"
+#include "content/renderer/manifest/manifest_debug_info.h"
class GURL;
@@ -28,16 +29,6 @@ namespace content {
// http://w3c.github.io/manifest/#dfn-steps-for-processing-a-manifest
class CONTENT_EXPORT ManifestParser {
public:
- class ErrorInfo {
- public:
- ErrorInfo(const std::string& error_msg, int error_line, int error_column)
- : error_msg(error_msg),
- error_line(error_line),
- error_column(error_column) {}
- const std::string error_msg;
- const int error_line;
- const int error_column;
- };
ManifestParser(const base::StringPiece& data,
const GURL& manifest_url,
const GURL& document_url);
@@ -48,9 +39,10 @@ class CONTENT_EXPORT ManifestParser {
void Parse();
const Manifest& manifest() const;
- const std::vector<std::unique_ptr<ErrorInfo>>& errors() const;
bool failed() const;
+ void TakeErrors(std::vector<ManifestDebugInfo::Error>* errors);
+
private:
// Used to indicate whether to strip whitespace when parsing a string.
enum TrimType {
@@ -190,6 +182,7 @@ class CONTENT_EXPORT ManifestParser {
const base::DictionaryValue& dictionary);
void AddErrorInfo(const std::string& error_msg,
+ bool critical = false,
int error_line = 0,
int error_column = 0);
@@ -199,7 +192,7 @@ class CONTENT_EXPORT ManifestParser {
bool failed_;
Manifest manifest_;
- std::vector<std::unique_ptr<ErrorInfo>> errors_;
+ std::vector<ManifestDebugInfo::Error> errors_;
DISALLOW_COPY_AND_ASSIGN(ManifestParser);
};
« no previous file with comments | « content/renderer/manifest/manifest_manager.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698