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

Unified Diff: trunk/src/chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 273243002: Revert 269415 "Introduce a new framework for back-and-forth trac..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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: trunk/src/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
===================================================================
--- trunk/src/chrome/browser/prefs/profile_pref_store_manager_unittest.cc (revision 269437)
+++ trunk/src/chrome/browser/prefs/profile_pref_store_manager_unittest.cc (working copy)
@@ -23,7 +23,6 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/prefs/pref_hash_filter.h"
-#include "chrome/common/pref_names.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -112,17 +111,6 @@
std::string(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
- // As in chrome_pref_service_factory.cc, kPreferencesResetTime needs to be
- // declared as protected in order to be read from the proper store by the
- // SegregatedPrefStore. Only declare it after configured prefs have been
- // registered above for this test as kPreferenceResetTime is already
- // registered in ProfilePrefStoreManager::RegisterProfilePrefs.
- PrefHashFilter::TrackedPreferenceMetadata pref_reset_time_config =
- {configuration_.rbegin()->reporting_id + 1, prefs::kPreferenceResetTime,
- PrefHashFilter::ENFORCE_ON_LOAD,
- PrefHashFilter::TRACKING_STRATEGY_ATOMIC};
- configuration_.push_back(pref_reset_time_config);
-
ASSERT_TRUE(profile_dir_.CreateUniqueTempDir());
ReloadConfiguration();
}
@@ -434,7 +422,11 @@
WasResetRecorded());
}
-// This test verifies that preference values are correctly maintained when a
+// This test does not directly verify that the values are moved from one pref
+// store to the other. segregated_pref_store_unittest.cc _does_ verify that
+// functionality.
+//
+// _This_ test verifies that preference values are correctly maintained when a
// preference's protection state changes from protected to unprotected.
TEST_F(ProfilePrefStoreManagerTest, ProtectedToUnprotected) {
InitializePrefs();
@@ -446,7 +438,7 @@
it != configuration_.end();
++it) {
if (it->name == kProtectedAtomic) {
- it->enforcement_level = PrefHashFilter::NO_ENFORCEMENT;
+ configuration_.erase(it);
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698