OLD | NEW |
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_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ |
6 #define EXTENSIONS_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ |
7 | 7 |
| 8 #include <set> |
| 9 |
8 #include "url/gurl.h" | 10 #include "url/gurl.h" |
9 | 11 |
10 namespace base { | 12 namespace base { |
| 13 class FilePath; |
11 class Version; | 14 class Version; |
12 } | 15 } |
13 | 16 |
14 namespace extensions { | 17 namespace extensions { |
15 | 18 |
16 class Extension; | 19 class Extension; |
17 | 20 |
18 // A pointer to the bytes of a public key, and the number of bytes. | 21 // A pointer to the bytes of a public key, and the number of bytes. |
19 struct ContentVerifierKey { | 22 struct ContentVerifierKey { |
20 const uint8* data; | 23 const uint8* data; |
(...skipping 18 matching lines...) Expand all Loading... |
39 // out parameters. NOTE: the pointer returned *must* remain valid for the | 42 // out parameters. NOTE: the pointer returned *must* remain valid for the |
40 // lifetime of this object. | 43 // lifetime of this object. |
41 virtual const ContentVerifierKey& PublicKey() = 0; | 44 virtual const ContentVerifierKey& PublicKey() = 0; |
42 | 45 |
43 // This should return a URL that can be used to fetch the | 46 // This should return a URL that can be used to fetch the |
44 // verified_contents.json containing signatures for the given extension | 47 // verified_contents.json containing signatures for the given extension |
45 // id/version pair. | 48 // id/version pair. |
46 virtual GURL GetSignatureFetchUrl(const std::string& extension_id, | 49 virtual GURL GetSignatureFetchUrl(const std::string& extension_id, |
47 const base::Version& version) = 0; | 50 const base::Version& version) = 0; |
48 | 51 |
| 52 // This should return the set of file paths for images used within the |
| 53 // browser process. (These may get transcoded during the install process). |
| 54 virtual std::set<base::FilePath> GetBrowserImagePaths( |
| 55 const extensions::Extension* extension) = 0; |
| 56 |
49 // Called when the content verifier detects that a read of a file inside | 57 // Called when the content verifier detects that a read of a file inside |
50 // an extension did not match its expected hash. | 58 // an extension did not match its expected hash. |
51 virtual void VerifyFailed(const std::string& extension_id) = 0; | 59 virtual void VerifyFailed(const std::string& extension_id) = 0; |
52 }; | 60 }; |
53 | 61 |
54 } // namespace extensions | 62 } // namespace extensions |
55 | 63 |
56 #endif // EXTENSIONS_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ | 64 #endif // EXTENSIONS_BROWSER_CONTENT_VERIFIER_DELEGATE_H_ |
OLD | NEW |