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

Side by Side Diff: extensions/common/manifest_handlers/externally_connectable.h

Issue 599163003: Add whitelist for extensions to put <all_urls> in externally_connectable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed permission warnings unittest Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 struct ExternallyConnectableInfo : public Extension::ManifestData { 50 struct ExternallyConnectableInfo : public Extension::ManifestData {
51 public: 51 public:
52 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was 52 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was
53 // specified. 53 // specified.
54 static ExternallyConnectableInfo* Get(const Extension* extension); 54 static ExternallyConnectableInfo* Get(const Extension* extension);
55 55
56 // Tries to construct the info based on |value|, as it would have appeared in 56 // Tries to construct the info based on |value|, as it would have appeared in
57 // the manifest. Sets |error| and returns an empty scoped_ptr on failure. 57 // the manifest. Sets |error| and returns an empty scoped_ptr on failure.
58 static scoped_ptr<ExternallyConnectableInfo> FromValue( 58 static scoped_ptr<ExternallyConnectableInfo> FromValue(
59 const base::Value& value, 59 const base::Value& value,
60 bool allow_all_urls,
60 std::vector<InstallWarning>* install_warnings, 61 std::vector<InstallWarning>* install_warnings,
61 base::string16* error); 62 base::string16* error);
62 63
63 virtual ~ExternallyConnectableInfo(); 64 virtual ~ExternallyConnectableInfo();
64 65
65 // The URL patterns that are allowed to connect/sendMessage. 66 // The URL patterns that are allowed to connect/sendMessage.
66 const URLPatternSet matches; 67 const URLPatternSet matches;
67 68
68 // The extension IDs that are allowed to connect/sendMessage. Sorted. 69 // The extension IDs that are allowed to connect/sendMessage. Sorted.
69 const std::vector<std::string> ids; 70 const std::vector<std::string> ids;
(...skipping 18 matching lines...) Expand all
88 bool all_ids, 89 bool all_ids,
89 bool accepts_tls_channel_id); 90 bool accepts_tls_channel_id);
90 91
91 private: 92 private:
92 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo); 93 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo);
93 }; 94 };
94 95
95 } // namespace extensions 96 } // namespace extensions
96 97
97 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 98 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
OLDNEW
« no previous file with comments | « extensions/common/api/_permission_features.json ('k') | extensions/common/manifest_handlers/externally_connectable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698