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.
5 #ifndef EXTENSIONS_BROWSER_CRX_FILE_INFO_H_
6 #define EXTENSIONS_BROWSER_CRX_FILE_INFO_H_
10 #include "base/files/file_path.h"
12 namespace extensions
{
14 // CRXFileInfo holds general information about a cached CRX file
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
);
23 bool operator==(const CRXFileInfo
& that
) const;
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
;
29 std::string expected_hash
;
32 } // namespace extensions
34 #endif // EXTENSIONS_BROWSER_CRX_FILE_H_