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

Side by Side Diff: chrome/common/extensions/manifest.h

Issue 9664053: Re-land 125247: Better error messages when using unsupported manifest features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « chrome/common/extensions/feature_unittest.cc ('k') | chrome/common/extensions/manifest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_H_
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_ 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Returns true if this equals the |other| manifest. 75 // Returns true if this equals the |other| manifest.
76 bool Equals(const Manifest* other) const; 76 bool Equals(const Manifest* other) const;
77 77
78 // Gets the underlying DictionaryValue representing the manifest. 78 // Gets the underlying DictionaryValue representing the manifest.
79 // Note: only know this when you KNOW you don't need the validation. 79 // Note: only know this when you KNOW you don't need the validation.
80 base::DictionaryValue* value() const { return value_.get(); } 80 base::DictionaryValue* value() const { return value_.get(); }
81 81
82 private: 82 private:
83 // Returns true if the extension can specify the given |path|. 83 // Returns true if the extension can specify the given |path|.
84 bool CanAccessPath(const std::string& path) const; 84 bool CanAccessPath(const std::string& path) const;
85 bool CanAccessKey(const std::string& key, bool* was_known) const; 85 bool CanAccessKey(const std::string& key) const;
86 86
87 // A persistent, globally unique ID. An extension's ID is used in things 87 // A persistent, globally unique ID. An extension's ID is used in things
88 // like directory structures and URLs, and is expected to not change across 88 // like directory structures and URLs, and is expected to not change across
89 // versions. It is generated as a SHA-256 hash of the extension's public 89 // versions. It is generated as a SHA-256 hash of the extension's public
90 // key, or as a hash of the path in the case of unpacked extensions. 90 // key, or as a hash of the path in the case of unpacked extensions.
91 std::string extension_id_; 91 std::string extension_id_;
92 92
93 // The location the extension was loaded from. 93 // The location the extension was loaded from.
94 Extension::Location location_; 94 Extension::Location location_;
95 95
96 // The underlying dictionary representation of the manifest. 96 // The underlying dictionary representation of the manifest.
97 scoped_ptr<base::DictionaryValue> value_; 97 scoped_ptr<base::DictionaryValue> value_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(Manifest); 99 DISALLOW_COPY_AND_ASSIGN(Manifest);
100 }; 100 };
101 101
102 } // namespace extensions 102 } // namespace extensions
103 103
104 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ 104 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/feature_unittest.cc ('k') | chrome/common/extensions/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698