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

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

Issue 919293002: Add related_applications field to manifest parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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.h
diff --git a/content/renderer/manifest/manifest_parser.h b/content/renderer/manifest/manifest_parser.h
index 13e330b0ddbb18ca0cc78dcc98199d027f290015..1dcbb253bba05278baca93946ba6cdf9a10a58b6 100644
--- a/content/renderer/manifest/manifest_parser.h
+++ b/content/renderer/manifest/manifest_parser.h
@@ -135,6 +135,23 @@ class CONTENT_EXPORT ManifestParser {
// Returns true iff the string could be parsed as the boolean true.
bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary);
+ // Parses the platform field of a related application.
+ // Returns RELATED_APPLICATION_PLATFORM_UNSPECIFIED if the parsing failed.
+ Manifest::RelatedApplicationPlatform ParseRelatedApplicationPlatform(
mlamouri (slow - plz ping) 2015/02/16 20:20:40 nit: maybe prefix with Chrome?
benwells 2015/02/16 23:58:43 Done.
+ const base::DictionaryValue& application);
+
+ // Parses the id field of a related application.
+ // Returns the parsed string if any, a null string if the parsing failed.
+ base::NullableString16 ParseRelatedApplicationId(
mlamouri (slow - plz ping) 2015/02/16 20:20:40 ditto
benwells 2015/02/16 23:58:43 Done.
+ const base::DictionaryValue& application);
+
+ // Parses the 'chrome_related_applications' field of the manifest.
+ // Returns a vector of Manifest::RelatedApplication with the successfully
+ // parsed applications, if any. An empty vector if the field was not present
+ // or empty.
+ std::vector<Manifest::RelatedApplication> ParseChromeRelatedApplications(
+ const base::DictionaryValue& dictionary);
+
const base::StringPiece& data_;
GURL manifest_url_;
GURL document_url_;

Powered by Google App Engine
This is Rietveld 408576698