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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc

Issue 2418813002: [Reland] Refactoring of SBER preference usage (Closed)
Patch Set: Sync Created 4 years, 2 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/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
index 73e89658e245c3c0263f4d5dfc7f60b70df58b9e..e73e6e8ae917bd330b285d4c04af5752cac37e5c 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
@@ -34,6 +34,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
+#include "components/safe_browsing_db/safe_browsing_prefs.h"
#include "components/syncable_prefs/testing_pref_service_syncable.h"
#include "content/public/test/test_browser_thread.h"
#include "extensions/browser/quota_service.h"
@@ -267,7 +268,7 @@ class IncidentReportingServiceTest : public testing::Test {
chrome::RegisterUserProfilePrefs(prefs->registry());
prefs->SetBoolean(prefs::kSafeBrowsingEnabled,
safe_browsing_opt_in != SAFE_BROWSING_OPT_OUT);
- prefs->SetBoolean(prefs::kSafeBrowsingExtendedReportingEnabled,
+ prefs->SetBoolean(safe_browsing::GetExtendedReportingPrefName(),
safe_browsing_opt_in == EXTENDED_REPORTING_OPT_IN);
if (incidents_sent)
prefs->Set(prefs::kSafeBrowsingIncidentsSent, *incidents_sent);
@@ -814,7 +815,7 @@ TEST_F(IncidentReportingServiceTest, NoUploadBeforeExtendedReporting) {
// Ensure that no report processing remains.
ASSERT_FALSE(instance_->IsProcessingReport());
- profile->GetPrefs()->SetBoolean(prefs::kSafeBrowsingExtendedReportingEnabled,
+ profile->GetPrefs()->SetBoolean(safe_browsing::GetExtendedReportingPrefName(),
true);
// Add a variation on the incident to the service.

Powered by Google App Engine
This is Rietveld 408576698