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

Side by Side Diff: chrome/browser/safe_browsing/module_integrity_verifier_win.cc

Issue 440753002: The incident reporting service now calls VerifyModule. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/safe_browsing/module_integrity_verifier_win.h" 5 #include "chrome/browser/safe_browsing/module_integrity_verifier_win.h"
6 6
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/memory_mapped_file.h" 9 #include "base/files/memory_mapped_file.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 switch (type) { 169 switch (type) {
170 case IMAGE_REL_BASED_HIGHLOW: { 170 case IMAGE_REL_BASED_HIGHLOW: {
171 AddBytesCorrectedByReloc(reinterpret_cast<uintptr_t>(address), state); 171 AddBytesCorrectedByReloc(reinterpret_cast<uintptr_t>(address), state);
172 break; 172 break;
173 } 173 }
174 case IMAGE_REL_BASED_ABSOLUTE: 174 case IMAGE_REL_BASED_ABSOLUTE:
175 // Absolute type relocations are a noop, sometimes used to pad a section 175 // Absolute type relocations are a noop, sometimes used to pad a section
176 // of relocations. 176 // of relocations.
177 break; 177 break;
178 default: { 178 default: {
179 // TODO(krstnmnlsn): Find a reliable description of the behaviour of the 179 // TODO(robertshield): Find a reliable description of the behaviour of the
180 // remaining types of relocation and handle them. 180 // remaining types of relocation and handle them.
181 state->unknown_reloc_type = true; 181 state->unknown_reloc_type = true;
182 break; 182 break;
183 } 183 }
184 } 184 }
185 return true; 185 return true;
186 } 186 }
187 187
188 bool EnumExportsCallback(const base::win::PEImage& mem_peimage, 188 bool EnumExportsCallback(const base::win::PEImage& mem_peimage,
189 DWORD ordinal, 189 DWORD ordinal,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 mem_code_addr, 289 mem_code_addr,
290 code_size, 290 code_size,
291 exports, 291 exports,
292 state, 292 state,
293 modified_exports); 293 modified_exports);
294 294
295 return num_bytes_different ? MODULE_STATE_MODIFIED : MODULE_STATE_UNMODIFIED; 295 return num_bytes_different ? MODULE_STATE_MODIFIED : MODULE_STATE_UNMODIFIED;
296 } 296 }
297 297
298 } // namespace safe_browsing 298 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698