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

Unified Diff: chrome/common/extensions/api/sockets/sockets_manifest_handler.h

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test and clang presubmit errors. Created 7 years, 1 month 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/common/extensions/api/sockets/sockets_manifest_handler.h
diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_handler.h b/chrome/common/extensions/api/sockets/sockets_manifest_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..17dc4010ce62dbd594a258103ad54e50e01199b9
--- /dev/null
+++ b/chrome/common/extensions/api/sockets/sockets_manifest_handler.h
@@ -0,0 +1,41 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_COMMON_EXTENSIONS_API_SOCKETS_SOCKETS_MANIFEST_HANDLER_H_
+#define CHROME_COMMON_EXTENSIONS_API_SOCKETS_SOCKETS_MANIFEST_HANDLER_H_
+
+#include <string>
+#include <vector>
+
+#include "extensions/common/manifest_handler.h"
+
+namespace extensions {
+class Extension;
+class ManifestPermission;
+}
+
+namespace extensions {
+
+// Parses the "sockets" manifest key.
+class SocketsManifestHandler : public ManifestHandler {
+ public:
+ SocketsManifestHandler();
+ virtual ~SocketsManifestHandler();
+
+ // ManifestHandler overrides.
+ virtual bool Parse(Extension* extension, string16* error) OVERRIDE;
+ virtual ManifestPermission* CreatePermission() OVERRIDE;
+ virtual ManifestPermission* CreateInitialRequiredPermission(
+ const Extension* extension) OVERRIDE;
+
+ private:
+ // ManifestHandler overrides.
+ virtual const std::vector<std::string> Keys() const OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(SocketsManifestHandler);
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_API_SOCKETS_SOCKETS_MANIFEST_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698