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

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

Issue 16464004: Turn disallowed URL patterns such as <all_urls> for externally_connectable into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test that warnings also imply failure Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/manifest_handlers/externally_connectable.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/common/extensions/extension.h" 12 #include "chrome/common/extensions/extension.h"
13 #include "chrome/common/extensions/manifest_handler.h" 13 #include "chrome/common/extensions/manifest_handler.h"
14 #include "extensions/common/install_warning.h"
14 #include "extensions/common/url_pattern_set.h" 15 #include "extensions/common/url_pattern_set.h"
15 16
16 class GURL; 17 class GURL;
17 18
18 namespace base { 19 namespace base {
19 class Value; 20 class Value;
20 } 21 }
21 22
22 namespace extensions { 23 namespace extensions {
23 24
(...skipping 24 matching lines...) Expand all
48 struct ExternallyConnectableInfo : public Extension::ManifestData { 49 struct ExternallyConnectableInfo : public Extension::ManifestData {
49 public: 50 public:
50 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was 51 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was
51 // specified. 52 // specified.
52 static ExternallyConnectableInfo* Get(const Extension* extension); 53 static ExternallyConnectableInfo* Get(const Extension* extension);
53 54
54 // Tries to construct the info based on |value|, as it would have appeared in 55 // Tries to construct the info based on |value|, as it would have appeared in
55 // the manifest. Sets |error| and returns an empty scoped_ptr on failure. 56 // the manifest. Sets |error| and returns an empty scoped_ptr on failure.
56 static scoped_ptr<ExternallyConnectableInfo> FromValue( 57 static scoped_ptr<ExternallyConnectableInfo> FromValue(
57 const base::Value& value, 58 const base::Value& value,
59 std::vector<InstallWarning>* install_warnings,
58 string16* error); 60 string16* error);
59 61
60 virtual ~ExternallyConnectableInfo(); 62 virtual ~ExternallyConnectableInfo();
61 63
62 // The URL patterns that are allowed to connect/sendMessage. 64 // The URL patterns that are allowed to connect/sendMessage.
63 const URLPatternSet matches; 65 const URLPatternSet matches;
64 66
65 // The extension IDs that are allowed to connect/sendMessage. Sorted. 67 // The extension IDs that are allowed to connect/sendMessage. Sorted.
66 const std::vector<std::string> ids; 68 const std::vector<std::string> ids;
67 69
(...skipping 12 matching lines...) Expand all
80 const std::vector<std::string>& ids, 82 const std::vector<std::string>& ids,
81 bool all_ids); 83 bool all_ids);
82 84
83 private: 85 private:
84 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo); 86 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo);
85 }; 87 };
86 88
87 } // namespace extensions 89 } // namespace extensions
88 90
89 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 91 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/manifest_handlers/externally_connectable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698