| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/chrome_browsing_data_remover_delegate.h" | 5 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 574 |
| 575 bool RecordDismissAndEmbargo(const GURL& url, | 575 bool RecordDismissAndEmbargo(const GURL& url, |
| 576 ContentSettingsType permission) { | 576 ContentSettingsType permission) { |
| 577 return autoblocker_->RecordDismissAndEmbargo(url, permission); | 577 return autoblocker_->RecordDismissAndEmbargo(url, permission); |
| 578 } | 578 } |
| 579 | 579 |
| 580 void CheckEmbargo(const GURL& url, | 580 void CheckEmbargo(const GURL& url, |
| 581 ContentSettingsType permission, | 581 ContentSettingsType permission, |
| 582 ContentSetting expected_setting) { | 582 ContentSetting expected_setting) { |
| 583 EXPECT_EQ(expected_setting, | 583 EXPECT_EQ(expected_setting, |
| 584 autoblocker_->GetEmbargoResult(permission, url).content_setting); | 584 autoblocker_->GetEmbargoResult(url, permission).content_setting); |
| 585 } | 585 } |
| 586 | 586 |
| 587 private: | 587 private: |
| 588 PermissionDecisionAutoBlocker* autoblocker_; | 588 PermissionDecisionAutoBlocker* autoblocker_; |
| 589 | 589 |
| 590 DISALLOW_COPY_AND_ASSIGN(RemovePermissionPromptCountsTest); | 590 DISALLOW_COPY_AND_ASSIGN(RemovePermissionPromptCountsTest); |
| 591 }; | 591 }; |
| 592 | 592 |
| 593 #if BUILDFLAG(ENABLE_PLUGINS) | 593 #if BUILDFLAG(ENABLE_PLUGINS) |
| 594 // A small modification to MockBrowsingDataFlashLSOHelper so that it responds | 594 // A small modification to MockBrowsingDataFlashLSOHelper so that it responds |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 EXPECT_THAT(language_model->GetLanguageFrequency("es"), FloatEq(0.25)); | 1821 EXPECT_THAT(language_model->GetLanguageFrequency("es"), FloatEq(0.25)); |
| 1822 | 1822 |
| 1823 // Clearing the full history does the trick. | 1823 // Clearing the full history does the trick. |
| 1824 BlockUntilBrowsingDataRemoved(base::Time(), base::Time::Max(), | 1824 BlockUntilBrowsingDataRemoved(base::Time(), base::Time::Max(), |
| 1825 BrowsingDataRemover::REMOVE_HISTORY, false); | 1825 BrowsingDataRemover::REMOVE_HISTORY, false); |
| 1826 | 1826 |
| 1827 EXPECT_THAT(language_model->GetTopLanguages(), SizeIs(0)); | 1827 EXPECT_THAT(language_model->GetTopLanguages(), SizeIs(0)); |
| 1828 EXPECT_THAT(language_model->GetLanguageFrequency("en"), FloatEq(0.0)); | 1828 EXPECT_THAT(language_model->GetLanguageFrequency("en"), FloatEq(0.0)); |
| 1829 EXPECT_THAT(language_model->GetLanguageFrequency("es"), FloatEq(0.0)); | 1829 EXPECT_THAT(language_model->GetLanguageFrequency("es"), FloatEq(0.0)); |
| 1830 } | 1830 } |
| OLD | NEW |