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

Side by Side Diff: extensions/browser/content_hash_fetcher.h

Issue 2845223003: [Merge m59] Only whitelist messages.json files in _locales for content verification (Closed)
Patch Set: Created 3 years, 7 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_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 <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 // 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
32 // 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
33 // sure they match the signed treehash root hash). 33 // sure they match the signed treehash root hash).
34 class ContentHashFetcher { 34 class ContentHashFetcher {
35 public: 35 public:
36 // A callback for when a fetch is complete. This reports back: 36 // A callback for when a fetch is complete. This reports back:
37 // -extension id 37 // -extension id
38 // -whether we were successful or not (have verified_contents.json and 38 // -whether we were successful or not (have verified_contents.json and
39 // -computed_hashes.json files) 39 // -computed_hashes.json files)
40 // -was it a forced check? 40 // -was it a forced check?
41 // -a set of paths whose contents didn't match expected values 41 // -a set of unix style paths whose contents didn't match expected values
42 typedef base::Callback< 42 typedef base::Callback<
43 void(const std::string&, bool, bool, const std::set<base::FilePath>&)> 43 void(const std::string&, bool, bool, const std::set<base::FilePath>&)>
44 FetchCallback; 44 FetchCallback;
45 45
46 // The consumer of this class needs to ensure that context and delegate 46 // The consumer of this class needs to ensure that context and delegate
47 // outlive this object. 47 // outlive this object.
48 ContentHashFetcher(net::URLRequestContextGetter* context_getter, 48 ContentHashFetcher(net::URLRequestContextGetter* context_getter,
49 ContentVerifierDelegate* delegate, 49 ContentVerifierDelegate* delegate,
50 const FetchCallback& callback); 50 const FetchCallback& callback);
51 virtual ~ContentHashFetcher(); 51 virtual ~ContentHashFetcher();
(...skipping 24 matching lines...) Expand all
76 76
77 // Used for binding callbacks passed to jobs. 77 // Used for binding callbacks passed to jobs.
78 base::WeakPtrFactory<ContentHashFetcher> weak_ptr_factory_; 78 base::WeakPtrFactory<ContentHashFetcher> weak_ptr_factory_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(ContentHashFetcher); 80 DISALLOW_COPY_AND_ASSIGN(ContentHashFetcher);
81 }; 81 };
82 82
83 } // namespace extensions 83 } // namespace extensions
84 84
85 #endif // EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_ 85 #endif // EXTENSIONS_BROWSER_CONTENT_HASH_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/content_verifier/content_script_locales.crx ('k') | extensions/browser/content_hash_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698