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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.cc

Issue 2250893002: Permission Action Reporting: Add num_prior_* fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@par-new-fields-proto
Patch Set: Also update browsertest Created 4 years, 4 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 (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 <list> 10 #include <list>
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 1022
1023 DISALLOW_COPY_AND_ASSIGN(RemovePasswordsTester); 1023 DISALLOW_COPY_AND_ASSIGN(RemovePasswordsTester);
1024 }; 1024 };
1025 1025
1026 class RemovePermissionPromptCountsTest { 1026 class RemovePermissionPromptCountsTest {
1027 public: 1027 public:
1028 explicit RemovePermissionPromptCountsTest(TestingProfile* profile) 1028 explicit RemovePermissionPromptCountsTest(TestingProfile* profile)
1029 : blocker_(new PermissionDecisionAutoBlocker(profile)) {} 1029 : blocker_(new PermissionDecisionAutoBlocker(profile)) {}
1030 1030
1031 int GetDismissCount(const GURL& url, content::PermissionType permission) { 1031 int GetDismissCount(const GURL& url, content::PermissionType permission) {
1032 return blocker_->GetActionCountForTest(url, permission, 1032 return blocker_->GetDismissCount(url, permission);
1033 PermissionDecisionAutoBlocker::kPromptDismissCountKey);
1034 } 1033 }
1035 1034
1036 int GetIgnoreCount(const GURL& url, content::PermissionType permission) { 1035 int GetIgnoreCount(const GURL& url, content::PermissionType permission) {
1037 return blocker_->GetActionCountForTest(url, permission, 1036 return blocker_->GetIgnoreCount(url, permission);
1038 PermissionDecisionAutoBlocker::kPromptIgnoreCountKey);
1039 } 1037 }
1040 1038
1041 int RecordIgnore(const GURL& url, content::PermissionType permission) { 1039 int RecordIgnore(const GURL& url, content::PermissionType permission) {
1042 return blocker_->RecordIgnore(url, permission); 1040 return blocker_->RecordIgnore(url, permission);
1043 } 1041 }
1044 1042
1045 bool ShouldChangeDismissalToBlock(const GURL& url, 1043 bool ShouldChangeDismissalToBlock(const GURL& url,
1046 content::PermissionType permission) { 1044 content::PermissionType permission) {
1047 return blocker_->ShouldChangeDismissalToBlock(url, permission); 1045 return blocker_->ShouldChangeDismissalToBlock(url, permission);
1048 } 1046 }
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after
2925 EXPECT_TRUE(remover->is_removing()); 2923 EXPECT_TRUE(remover->is_removing());
2926 2924
2927 // Add one more deletion and wait for it. 2925 // Add one more deletion and wait for it.
2928 BlockUntilBrowsingDataRemoved( 2926 BlockUntilBrowsingDataRemoved(
2929 browsing_data::ALL_TIME, 2927 browsing_data::ALL_TIME,
2930 BrowsingDataRemover::REMOVE_COOKIES, 2928 BrowsingDataRemover::REMOVE_COOKIES,
2931 BrowsingDataHelper::UNPROTECTED_WEB); 2929 BrowsingDataHelper::UNPROTECTED_WEB);
2932 2930
2933 EXPECT_FALSE(remover->is_removing()); 2931 EXPECT_FALSE(remover->is_removing());
2934 } 2932 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698