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

Side by Side Diff: chrome/common/safe_browsing/pe_image_reader_win.cc

Issue 1015363003: Move BinaryFeatureExtractor and PEImageReader to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zip2
Patch Set: sync to position 321353 Created 5 years, 9 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/pe_image_reader_win.h" 5 #include "chrome/common/safe_browsing/pe_image_reader_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace safe_browsing { 9 namespace safe_browsing {
10 10
11 // A class template of traits pertaining to IMAGE_OPTIONAL_HEADER{32,64}. 11 // A class template of traits pertaining to IMAGE_OPTIONAL_HEADER{32,64}.
12 template<class HEADER_TYPE> 12 template<class HEADER_TYPE>
13 struct OptionalHeaderTraits { 13 struct OptionalHeaderTraits {
14 }; 14 };
15 15
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (data_offset >= header->SizeOfRawData || 324 if (data_offset >= header->SizeOfRawData ||
325 header->SizeOfRawData - data_offset < entry->Size) { 325 header->SizeOfRawData - data_offset < entry->Size) {
326 return NULL; 326 return NULL;
327 } 327 }
328 328
329 *data_length = entry->Size; 329 *data_length = entry->Size;
330 return image_data_ + header->PointerToRawData + data_offset; 330 return image_data_ + header->PointerToRawData + data_offset;
331 } 331 }
332 332
333 } // namespace safe_browsing 333 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/common/safe_browsing/pe_image_reader_win.h ('k') | chrome/common/safe_browsing/pe_image_reader_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698