| OLD | NEW |
| 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/binary_integrity_analy
zer.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/test/scoped_path_override.h" | 12 #include "base/test/scoped_path_override.h" |
| 13 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 13 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| 14 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" | 14 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" |
| 15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 16 #include "chrome/common/chrome_version.h" |
| 16 #include "chrome/common/safe_browsing/csd.pb.h" | 17 #include "chrome/common/safe_browsing/csd.pb.h" |
| 17 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "version.h" // NOLINT | |
| 20 | 20 |
| 21 using ::testing::_; | 21 using ::testing::_; |
| 22 using ::testing::StrictMock; | 22 using ::testing::StrictMock; |
| 23 | 23 |
| 24 namespace safe_browsing { | 24 namespace safe_browsing { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 const wchar_t kChromeDll[] = L"chrome.dll"; | 28 const wchar_t kChromeDll[] = L"chrome.dll"; |
| 29 const wchar_t kChromeChildDll[] = L"chrome_child.dll"; | 29 const wchar_t kChromeChildDll[] = L"chrome_child.dll"; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 scoped_ptr<ClientIncidentReport_IncidentData> incident_data( | 129 scoped_ptr<ClientIncidentReport_IncidentData> incident_data( |
| 130 incident->TakePayload()); | 130 incident->TakePayload()); |
| 131 ASSERT_TRUE(incident_data->has_binary_integrity()); | 131 ASSERT_TRUE(incident_data->has_binary_integrity()); |
| 132 ASSERT_TRUE(incident_data->binary_integrity().has_file_basename()); | 132 ASSERT_TRUE(incident_data->binary_integrity().has_file_basename()); |
| 133 ASSERT_EQ("chrome_elf.dll", | 133 ASSERT_EQ("chrome_elf.dll", |
| 134 incident_data->binary_integrity().file_basename()); | 134 incident_data->binary_integrity().file_basename()); |
| 135 ASSERT_TRUE(incident_data->binary_integrity().has_signature()); | 135 ASSERT_TRUE(incident_data->binary_integrity().has_signature()); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace safe_browsing | 138 } // namespace safe_browsing |
| OLD | NEW |