Roll src/third_party/WebKit 48e5493c:ad9da0e (svn 202519:202521)
[chromium-blink-merge.git] / extensions / browser / crx_file_info.h
blob49a53415c373e8b3a22fa6c07936c121043cb6b6
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_
8 #include <string>
10 #include "base/files/file_path.h"
12 namespace extensions {
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);
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;
28 base::FilePath path;
29 std::string expected_hash;
32 } // namespace extensions
34 #endif // EXTENSIONS_BROWSER_CRX_FILE_H_