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

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

Issue 1932623003: DevTools: Introduce Page.getManifest remote debugging protocol method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/renderer/manifest/manifest_parser.cc
diff --git a/content/renderer/manifest/manifest_parser.cc b/content/renderer/manifest/manifest_parser.cc
index 40d4d3311004f334c47ebb315459bb413943b7a3..f129b01fec4ce60ca4eede323b30fcd8cf1d2c09 100644
--- a/content/renderer/manifest/manifest_parser.cc
+++ b/content/renderer/manifest/manifest_parser.cc
@@ -150,9 +150,10 @@ const Manifest& ManifestParser::manifest() const {
return manifest_;
}
-const std::vector<std::unique_ptr<ManifestParser::ErrorInfo>>&
-ManifestParser::errors() const {
- return errors_;
+void ManifestParser::TakeErrors(
+ std::vector<ManifestDebugInfo::Error>* errors) {
+ errors->clear();
+ errors->swap(errors_);
}
bool ManifestParser::failed() const {
@@ -446,7 +447,7 @@ base::NullableString16 ManifestParser::ParseGCMSenderID(
void ManifestParser::AddErrorInfo(const std::string& error_msg,
int error_line,
int error_column) {
- errors_.push_back(
- base::WrapUnique(new ErrorInfo(error_msg, error_line, error_column)));
+ errors_.push_back({error_msg, error_line, error_column});
}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698