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

Side by Side Diff: extensions/utility/unpacker.h

Issue 2321823002: Exclude exe files while unzipping CRXes (Closed)
Patch Set: Ignore case Created 4 years, 3 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
« no previous file with comments | « chrome/test/data/extensions/blocked_file_types.pem ('k') | extensions/utility/unpacker.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 EXTENSIONS_UTILITY_UNPACKER_H_ 5 #ifndef EXTENSIONS_UTILITY_UNPACKER_H_
6 #define EXTENSIONS_UTILITY_UNPACKER_H_ 6 #define EXTENSIONS_UTILITY_UNPACKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 // back out to disk for later use. 27 // back out to disk for later use.
28 class Unpacker { 28 class Unpacker {
29 public: 29 public:
30 Unpacker(const base::FilePath& working_dir, 30 Unpacker(const base::FilePath& working_dir,
31 const base::FilePath& extension_dir, 31 const base::FilePath& extension_dir,
32 const std::string& extension_id, 32 const std::string& extension_id,
33 Manifest::Location location, 33 Manifest::Location location,
34 int creation_flags); 34 int creation_flags);
35 ~Unpacker(); 35 ~Unpacker();
36 36
37 // Returns true if the given base::FilePath should be unzipped.
38 static bool ShouldExtractFile(const base::FilePath& file_path);
39
37 // Runs the processing steps for the extension. On success, this returns true 40 // Runs the processing steps for the extension. On success, this returns true
38 // and the decoded images will be in a file at 41 // and the decoded images will be in a file at
39 // |working_dir|/kDecodedImagesFilename and the decoded messages will be in a 42 // |working_dir|/kDecodedImagesFilename and the decoded messages will be in a
40 // file at |working_dir|/kDecodedMessageCatalogsFilename. 43 // file at |working_dir|/kDecodedMessageCatalogsFilename.
41 bool Run(); 44 bool Run();
42 45
43 const base::string16& error_message() { return error_message_; } 46 const base::string16& error_message() { return error_message_; }
44 base::DictionaryValue* parsed_manifest() { return parsed_manifest_.get(); } 47 base::DictionaryValue* parsed_manifest() { return parsed_manifest_.get(); }
45 base::DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); } 48 base::DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); }
46 49
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 105
103 // The last error message that was set. Empty if there were no errors. 106 // The last error message that was set. Empty if there were no errors.
104 base::string16 error_message_; 107 base::string16 error_message_;
105 108
106 DISALLOW_COPY_AND_ASSIGN(Unpacker); 109 DISALLOW_COPY_AND_ASSIGN(Unpacker);
107 }; 110 };
108 111
109 } // namespace extensions 112 } // namespace extensions
110 113
111 #endif // EXTENSIONS_UTILITY_UNPACKER_H_ 114 #endif // EXTENSIONS_UTILITY_UNPACKER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/blocked_file_types.pem ('k') | extensions/utility/unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698