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

Side by Side Diff: extensions/browser/crx_file_info.cc

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest build for windows. Created 5 years, 10 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 | « extensions/browser/crx_file_info.h ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "extensions/browser/crx_file_info.h"
6
7 #include "base/logging.h"
8
9 namespace extensions {
10
11 CRXFileInfo::CRXFileInfo() : path() {
12 }
13
14 CRXFileInfo::CRXFileInfo(const std::string& i,
15 const base::FilePath& p,
16 const std::string& h)
17 : extension_id(i), path(p), expected_hash(h) {
18 DCHECK(!path.empty());
19 }
20
21 CRXFileInfo::CRXFileInfo(const std::string& i, const base::FilePath& p)
22 : extension_id(i), path(p), expected_hash() {
23 DCHECK(!path.empty());
24 }
25
26 CRXFileInfo::CRXFileInfo(const base::FilePath& p)
27 : extension_id(), path(p), expected_hash() {
28 DCHECK(!path.empty());
29 }
30
31 bool CRXFileInfo::operator==(const CRXFileInfo& that) const {
32 return extension_id == that.extension_id && path == that.path &&
33 expected_hash == that.expected_hash;
34 }
35
36 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/crx_file_info.h ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698