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

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

Issue 575253002: Clean up unused param in RegistryOverrideManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more callers Created 6 years, 3 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/environment_data_colle ction_win.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/environment_data_colle ction_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (DllEntryContainsLspFeature(process_report, lsp)) 120 if (DllEntryContainsLspFeature(process_report, lsp))
121 return; 121 return;
122 122
123 FAIL() << "No LSP feature found for " << lsp; 123 FAIL() << "No LSP feature found for " << lsp;
124 } 124 }
125 125
126 TEST(SafeBrowsingEnvironmentDataCollectionWinTest, CollectDllBlacklistData) { 126 TEST(SafeBrowsingEnvironmentDataCollectionWinTest, CollectDllBlacklistData) {
127 // Ensure that CollectDllBlacklistData correctly adds the set of sanitized dll 127 // Ensure that CollectDllBlacklistData correctly adds the set of sanitized dll
128 // names currently stored in the registry to the report. 128 // names currently stored in the registry to the report.
129 registry_util::RegistryOverrideManager override_manager; 129 registry_util::RegistryOverrideManager override_manager;
130 override_manager.OverrideRegistry(HKEY_CURRENT_USER, L"safe_browsing_test"); 130 override_manager.OverrideRegistry(HKEY_CURRENT_USER);
131 131
132 base::win::RegKey blacklist_registry_key(HKEY_CURRENT_USER, 132 base::win::RegKey blacklist_registry_key(HKEY_CURRENT_USER,
133 blacklist::kRegistryFinchListPath, 133 blacklist::kRegistryFinchListPath,
134 KEY_QUERY_VALUE | KEY_SET_VALUE); 134 KEY_QUERY_VALUE | KEY_SET_VALUE);
135 135
136 // Check that with an empty registry the blacklisted dlls field is left empty. 136 // Check that with an empty registry the blacklisted dlls field is left empty.
137 safe_browsing::ClientIncidentReport_EnvironmentData_Process process_report; 137 safe_browsing::ClientIncidentReport_EnvironmentData_Process process_report;
138 safe_browsing::CollectDllBlacklistData(&process_report); 138 safe_browsing::CollectDllBlacklistData(&process_report);
139 EXPECT_EQ(0, process_report.blacklisted_dll_size()); 139 EXPECT_EQ(0, process_report.blacklisted_dll_size());
140 140
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 EXPECT_EQ(base::WideToUTF8(std::wstring(safe_browsing::kTestDllNames[0])), 210 EXPECT_EQ(base::WideToUTF8(std::wstring(safe_browsing::kTestDllNames[0])),
211 process_report.module_state(0).name()); 211 process_report.module_state(0).name());
212 EXPECT_EQ( 212 EXPECT_EQ(
213 safe_browsing::ClientIncidentReport_EnvironmentData_Process_ModuleState:: 213 safe_browsing::ClientIncidentReport_EnvironmentData_Process_ModuleState::
214 MODULE_STATE_MODIFIED, 214 MODULE_STATE_MODIFIED,
215 process_report.module_state(0).modified_state()); 215 process_report.module_state(0).modified_state());
216 EXPECT_EQ(1, process_report.module_state(0).modified_export_size()); 216 EXPECT_EQ(1, process_report.module_state(0).modified_export_size());
217 EXPECT_EQ(std::string(safe_browsing::kTestExportName), 217 EXPECT_EQ(std::string(safe_browsing::kTestExportName),
218 process_report.module_state(0).modified_export(0)); 218 process_report.module_state(0).modified_export(0));
219 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_galleries_test_util.cc ('k') | chrome/installer/gcapi/gcapi_last_run_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698