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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win_unittest.cc

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 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/incident_reporting/module_integrity_verif ier_win.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif ier_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <functional> 11 #include <functional>
12 #include <map> 12 #include <map>
13 #include <memory> 13 #include <memory>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/files/memory_mapped_file.h" 17 #include "base/files/memory_mapped_file.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/native_library.h" 19 #include "base/native_library.h"
20 #include "base/scoped_native_library.h" 20 #include "base/scoped_native_library.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/win/pe_image.h" 22 #include "base/win/pe_image.h"
23 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt est_util_win.h" 23 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt est_util_win.h"
24 #include "chrome/common/safe_browsing/csd.pb.h" 24 #include "components/safe_browsing/csd.pb.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 namespace safe_browsing { 27 namespace safe_browsing {
28 28
29 namespace { 29 namespace {
30 30
31 // A scoper that makes a modification at a given address when constructed, and 31 // A scoper that makes a modification at a given address when constructed, and
32 // reverts it upon destruction. 32 // reverts it upon destruction.
33 template <size_t ModificationLength> 33 template <size_t ModificationLength>
34 class ScopedModuleModifier { 34 class ScopedModuleModifier {
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 // One of the two exports now has two modifications. 389 // One of the two exports now has two modifications.
390 BuildModificationMap(state, &modification_map); 390 BuildModificationMap(state, &modification_map);
391 ASSERT_EQ(2U, modification_map.size()); 391 ASSERT_EQ(2U, modification_map.size());
392 ASSERT_EQ(3U, (modification_map.begin()->second.size() + 392 ASSERT_EQ(3U, (modification_map.begin()->second.size() +
393 (++modification_map.begin())->second.size())); 393 (++modification_map.begin())->second.size()));
394 } 394 }
395 #endif // ADDRESS_SANITIZER 395 #endif // ADDRESS_SANITIZER
396 396
397 } // namespace safe_browsing 397 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698