| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browsing_data/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 dbus_setter->SetCryptohomeClient( | 2250 dbus_setter->SetCryptohomeClient( |
| 2251 std::unique_ptr<chromeos::CryptohomeClient>(cryptohome_client)); | 2251 std::unique_ptr<chromeos::CryptohomeClient>(cryptohome_client)); |
| 2252 | 2252 |
| 2253 // Expect exactly one call. No calls means no attempt to delete keys and more | 2253 // Expect exactly one call. No calls means no attempt to delete keys and more |
| 2254 // than one call means a significant performance problem. | 2254 // than one call means a significant performance problem. |
| 2255 EXPECT_CALL(*cryptohome_client, TpmAttestationDeleteKeys(_, _, _, _)) | 2255 EXPECT_CALL(*cryptohome_client, TpmAttestationDeleteKeys(_, _, _, _)) |
| 2256 .WillOnce(WithArgs<3>(Invoke(FakeDBusCall))); | 2256 .WillOnce(WithArgs<3>(Invoke(FakeDBusCall))); |
| 2257 | 2257 |
| 2258 BlockUntilBrowsingDataRemoved( | 2258 BlockUntilBrowsingDataRemoved( |
| 2259 BrowsingDataRemover::EVERYTHING, | 2259 BrowsingDataRemover::EVERYTHING, |
| 2260 BrowsingDataRemover::REMOVE_CONTENT_LICENSES, false); | 2260 BrowsingDataRemover::REMOVE_MEDIA_LICENSES, false); |
| 2261 | 2261 |
| 2262 chromeos::DBusThreadManager::Shutdown(); | 2262 chromeos::DBusThreadManager::Shutdown(); |
| 2263 } | 2263 } |
| 2264 #endif | 2264 #endif |
| 2265 | 2265 |
| 2266 TEST_F(BrowsingDataRemoverTest, DomainReliability_Null) { | 2266 TEST_F(BrowsingDataRemoverTest, DomainReliability_Null) { |
| 2267 const ClearDomainReliabilityTester& tester = | 2267 const ClearDomainReliabilityTester& tester = |
| 2268 clear_domain_reliability_tester(); | 2268 clear_domain_reliability_tester(); |
| 2269 | 2269 |
| 2270 EXPECT_EQ(0u, tester.clear_count()); | 2270 EXPECT_EQ(0u, tester.clear_count()); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 BrowsingDataRemover::ClearSettingsForOneTypeWithPredicate( | 2536 BrowsingDataRemover::ClearSettingsForOneTypeWithPredicate( |
| 2537 host_content_settings_map, CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, | 2537 host_content_settings_map, CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, |
| 2538 base::Bind(&MatchPrimaryPattern, http_pattern)); | 2538 base::Bind(&MatchPrimaryPattern, http_pattern)); |
| 2539 // Verify we only have one, and it's url1. | 2539 // Verify we only have one, and it's url1. |
| 2540 host_content_settings_map->GetSettingsForOneType( | 2540 host_content_settings_map->GetSettingsForOneType( |
| 2541 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings); | 2541 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings); |
| 2542 EXPECT_EQ(1u, host_settings.size()); | 2542 EXPECT_EQ(1u, host_settings.size()); |
| 2543 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1), | 2543 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1), |
| 2544 host_settings[0].primary_pattern); | 2544 host_settings[0].primary_pattern); |
| 2545 } | 2545 } |
| OLD | NEW |