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

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

Issue 770023002: Push registration should read a "gcm_user_visible_only" key from the Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/public/common/manifest.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 6e5f8a9a988eb8994bac7946b7e9151337a14357..94b7e025db8321eb99191548c7f98338147f2eaa 100644
--- a/content/renderer/manifest/manifest_parser.h
+++ b/content/renderer/manifest/manifest_parser.h
@@ -43,6 +43,13 @@ class CONTENT_EXPORT ManifestParser {
NoTrim
};
+ // Helper function to parse booleans present on a given |dictionary| in a
+ // given field identified by its |key|.
+ // Returns the parsed boolean if any, or |default_value| if parsing failed.
+ bool ParseBoolean(const base::DictionaryValue& dictionary,
+ const std::string& key,
+ bool default_value);
+
// Helper function to parse strings present on a given |dictionary| in a given
// field identified by its |key|.
// Returns the parsed string if any, a null string if the parsing failed.
@@ -123,6 +130,11 @@ class CONTENT_EXPORT ManifestParser {
base::NullableString16 ParseGCMSenderID(
const base::DictionaryValue& dictionary);
+ // Parses the 'gcm_user_visible_only' field of the manifest.
+ // This is a proprietary extension of the Web Manifest specification.
+ // Returns true iff the string could be parsed as the boolean true.
+ bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary);
+
const base::StringPiece& data_;
const GURL& manifest_url_;
const GURL& document_url_;
« no previous file with comments | « content/public/common/manifest.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698