OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/nacl/loader/nacl_validation_query.h" | 5 #include "components/nacl/loader/nacl_validation_query.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/nacl/loader/nacl_validation_db.h" | 8 #include "components/nacl/loader/nacl_validation_db.h" |
9 #include "crypto/nss_util.h" | 9 #include "crypto/nss_util.h" |
10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
11 #include "native_client/src/public/nacl_file_info.h" | |
12 #include "native_client/src/trusted/validator/validation_cache.h" | 11 #include "native_client/src/trusted/validator/validation_cache.h" |
13 | 12 |
14 NaClValidationQueryContext::NaClValidationQueryContext( | 13 NaClValidationQueryContext::NaClValidationQueryContext( |
15 NaClValidationDB* db, | 14 NaClValidationDB* db, |
16 const std::string& profile_key, | 15 const std::string& profile_key, |
17 const std::string& nacl_version) | 16 const std::string& nacl_version) |
18 : db_(db), | 17 : db_(db), |
19 profile_key_(profile_key), | 18 profile_key_(profile_key), |
20 nacl_version_(nacl_version) { | 19 nacl_version_(nacl_version) { |
21 | 20 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Make sure any fields introduced in a cross-repo change are zeroed. | 136 // Make sure any fields introduced in a cross-repo change are zeroed. |
138 memset(cache, 0, sizeof(*cache)); | 137 memset(cache, 0, sizeof(*cache)); |
139 cache->handle = new NaClValidationQueryContext(db, profile_key, nacl_version); | 138 cache->handle = new NaClValidationQueryContext(db, profile_key, nacl_version); |
140 cache->CreateQuery = CreateQuery; | 139 cache->CreateQuery = CreateQuery; |
141 cache->AddData = AddData; | 140 cache->AddData = AddData; |
142 cache->QueryKnownToValidate = QueryKnownToValidate; | 141 cache->QueryKnownToValidate = QueryKnownToValidate; |
143 cache->SetKnownToValidate = SetKnownToValidate; | 142 cache->SetKnownToValidate = SetKnownToValidate; |
144 cache->DestroyQuery = DestroyQuery; | 143 cache->DestroyQuery = DestroyQuery; |
145 return cache; | 144 return cache; |
146 } | 145 } |
OLD | NEW |