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

Unified Diff: chrome/browser/prefs/pref_hash_store_impl.cc

Issue 329093003: Remove unloaded profile hash store initialization, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove more code. Created 6 years, 6 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/prefs/pref_hash_store_impl.cc
diff --git a/chrome/browser/prefs/pref_hash_store_impl.cc b/chrome/browser/prefs/pref_hash_store_impl.cc
index 096cbd9470b739d71403d929c9c5a1d745db16de..a82d449f4e40ff4618ca6c998a3c563ffafd56d5 100644
--- a/chrome/browser/prefs/pref_hash_store_impl.cc
+++ b/chrome/browser/prefs/pref_hash_store_impl.cc
@@ -81,19 +81,6 @@ scoped_ptr<PrefHashStoreTransaction> PrefHashStoreImpl::BeginTransaction() {
new PrefHashStoreTransactionImpl(this));
}
-PrefHashStoreImpl::StoreVersion PrefHashStoreImpl::GetCurrentVersion() const {
- if (!contents_->IsInitialized())
- return VERSION_UNINITIALIZED;
-
- int current_version;
- if (!contents_->GetVersion(&current_version)) {
- return VERSION_PRE_MIGRATION;
- }
-
- DCHECK_GT(current_version, VERSION_PRE_MIGRATION);
- return static_cast<StoreVersion>(current_version);
-}
-
void PrefHashStoreImpl::CommitPendingWrite() {
if (has_pending_write_) {
contents_->CommitPendingWrite();
@@ -118,19 +105,6 @@ PrefHashStoreImpl::PrefHashStoreTransactionImpl::
outer_->has_pending_write_ = true;
}
- // Mark this hash store has having been updated to the latest version (in
- // practice only initialization transactions will actually do this, but
- // since they always occur before minor update transaction it's okay
- // to unconditionally do this here). Only do this if this store's version
- // isn't already at VERSION_LATEST (to avoid scheduling a write when
- // unecessary). Note, this is outside of |if (has_changed)| to also seed
- // version number of otherwise unchanged profiles.
- int current_version;
- if (!outer_->contents_->GetVersion(&current_version) ||
- current_version != VERSION_LATEST) {
- outer_->contents_->SetVersion(VERSION_LATEST);
- outer_->has_pending_write_ = true;
- }
}
PrefHashStoreTransaction::ValueState

Powered by Google App Engine
This is Rietveld 408576698