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_HASH_FETCHER_H_ | 5 #ifndef EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ |
6 #define EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ | 6 #define EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <set> | 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "extensions/common/extension.h" | 16 #include "extensions/common/extension_id.h" |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class BrowserContext; | 19 class BrowserContext; |
19 } | 20 } |
20 | 21 |
21 namespace extensions { | 22 namespace extensions { |
22 | 23 class Extension; |
23 class ExtensionRegistry; | 24 class ExtensionRegistry; |
24 class ContentHashFetcherJob; | 25 class ContentHashFetcherJob; |
25 class ContentVerifierDelegate; | 26 class ContentVerifierDelegate; |
26 | 27 |
27 // This class is responsible for getting signed expected hashes for use in | 28 // This class is responsible for getting signed expected hashes for use in |
28 // extension content verification. As extensions are loaded it will fetch and | 29 // extension content verification. As extensions are loaded it will fetch and |
29 // parse/validate/cache this data as needed, including calculating expected | 30 // parse/validate/cache this data as needed, including calculating expected |
30 // hashes for each block of each file within an extension. (These unsigned leaf | 31 // hashes for each block of each file within an extension. (These unsigned leaf |
31 // node block level hashes will always be checked at time of use use to make | 32 // node block level hashes will always be checked at time of use use to make |
32 // sure they match the signed treehash root hash). | 33 // sure they match the signed treehash root hash). |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 // Used for binding callbacks passed to jobs. | 77 // Used for binding callbacks passed to jobs. |
77 base::WeakPtrFactory<ContentHashFetcher> weak_ptr_factory_; | 78 base::WeakPtrFactory<ContentHashFetcher> weak_ptr_factory_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(ContentHashFetcher); | 80 DISALLOW_COPY_AND_ASSIGN(ContentHashFetcher); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace extensions | 83 } // namespace extensions |
83 | 84 |
84 #endif // EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ | 85 #endif // EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ |
OLD | NEW |