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

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

Issue 936413003: Allow extensions of the ManifestParser outside of the content/ layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - changing chrome layer relationship 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: chrome/renderer/manifest/manifest_parser.cc
diff --git a/chrome/renderer/manifest/manifest_parser.cc b/chrome/renderer/manifest/manifest_parser.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3d7f9b231b0a0b4920dd76ec317fe62fa6afe2ff
--- /dev/null
+++ b/chrome/renderer/manifest/manifest_parser.cc
@@ -0,0 +1,26 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/renderer/manifest/manifest_parser.h"
+
+ChromeManifestParser::ChromeManifestParser()
+ : ManifestParser() {}
+
+ChromeManifestParser::~ChromeManifestParser() {}
+
+void ChromeManifestParser::ParseExtensionPoint(
+ const base::DictionaryValue& dictionary) {
+ manifest_.gcm_sender_id = ParseGCMSenderID(dictionary);
+ manifest_.gcm_user_visible_only = ParseGCMUserVisibleOnly(dictionary);
+}
+
+base::NullableString16 ChromeManifestParser::ParseGCMSenderID(
+ const base::DictionaryValue& dictionary) {
+ return ParseString(dictionary, "gcm_sender_id", Trim);
+}
+
+bool ChromeManifestParser::ParseGCMUserVisibleOnly(
+ const base::DictionaryValue& dictionary) {
+ return ParseBoolean(dictionary, "gcm_user_visible_only", false);
+}

Powered by Google App Engine
This is Rietveld 408576698