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

Unified Diff: chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc

Issue 2640033006: Convert AutoBlocker static class to KeyedService. (Closed)
Patch Set: Git surgery. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
index bdbf784e95f8354b42c39f85fe185a8a6894f91d..009376fe2b41a46514dc4c7901434db0a6430800 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
@@ -8,6 +8,7 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/time/time.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/browsing_data/browsing_data_filter_builder.h"
@@ -551,31 +552,27 @@ class RemovePasswordsTester {
class RemovePermissionPromptCountsTest {
public:
explicit RemovePermissionPromptCountsTest(TestingProfile* profile)
- : profile_(profile) {}
+ : autoblocker_(PermissionDecisionAutoBlocker::GetForProfile(profile)) {}
int GetDismissCount(const GURL& url, content::PermissionType permission) {
- return PermissionDecisionAutoBlocker::GetDismissCount(
- url, permission, profile_);
+ return autoblocker_->GetDismissCount(url, permission);
}
int GetIgnoreCount(const GURL& url, content::PermissionType permission) {
- return PermissionDecisionAutoBlocker::GetIgnoreCount(
- url, permission, profile_);
+ return autoblocker_->GetIgnoreCount(url, permission);
}
int RecordIgnore(const GURL& url, content::PermissionType permission) {
- return PermissionDecisionAutoBlocker::RecordIgnore(url, permission,
- profile_);
+ return autoblocker_->RecordIgnore(url, permission);
}
bool ShouldChangeDismissalToBlock(const GURL& url,
content::PermissionType permission) {
- return PermissionDecisionAutoBlocker::ShouldChangeDismissalToBlock(
- url, permission, profile_);
+ return autoblocker_->RecordDismissAndEmbargo(url, permission);
}
private:
- TestingProfile* profile_;
+ PermissionDecisionAutoBlocker* autoblocker_;
DISALLOW_COPY_AND_ASSIGN(RemovePermissionPromptCountsTest);
};

Powered by Google App Engine
This is Rietveld 408576698