OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_BROWSER_CRX_FILE_INFO_H_ |
| 6 #define EXTENSIONS_BROWSER_CRX_FILE_INFO_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/files/file_path.h" |
| 11 |
| 12 namespace extensions { |
| 13 |
| 14 // CRXFileInfo holds general information about a cached CRX file |
| 15 struct CRXFileInfo { |
| 16 CRXFileInfo(); |
| 17 CRXFileInfo(const std::string& extension_id, |
| 18 const base::FilePath& path, |
| 19 const std::string& hash); |
| 20 CRXFileInfo(const std::string& extension_id, const base::FilePath& path); |
| 21 explicit CRXFileInfo(const base::FilePath& path); |
| 22 |
| 23 bool operator==(const CRXFileInfo& that) const; |
| 24 |
| 25 // The only mandatory field is the file path, whereas extension_id and hash |
| 26 // are only being checked if those are non-empty. |
| 27 std::string extension_id; |
| 28 base::FilePath path; |
| 29 std::string expected_hash; |
| 30 }; |
| 31 |
| 32 } // namespace extensions |
| 33 |
| 34 #endif // EXTENSIONS_BROWSER_CRX_FILE_H_ |
OLD | NEW |