summaryrefslogtreecommitdiffstats
path: root/third_party/libaddressinput
diff options
context:
space:
mode:
authorraymes <raymes@chromium.org>2015-05-05 20:22:21 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 03:22:49 +0000
commit76de1af44ac758e104f2fea2f045f0274aa42221 (patch)
tree8eb169d5cbb849e7fb14de814896dc5720f9b737 /third_party/libaddressinput
parent3a9179a64eac8c0d606409b2ebdabd60b612151a (diff)
downloadchromium_src-76de1af44ac758e104f2fea2f045f0274aa42221.zip
chromium_src-76de1af44ac758e104f2fea2f045f0274aa42221.tar.gz
chromium_src-76de1af44ac758e104f2fea2f045f0274aa42221.tar.bz2
Add a PrefRegistrationFlags::LOSSY_PREF flag for writing lossy prefs
This adds a registration flag for marking a pref as "lossy". There is no strict time guarantee on when a lossy pref will be persisted to permanent storage when it is modified. WriteablePrefStore::PrefWriteFlags are introduced to be used to change the way that prefs get written into a WriteablePrefStore. The plumbing to pass registration flags down from PrefService into the WriteablePrefStore and convert them into PrefWriteFlags is also added here. The code which actually makes the pref behave in a lossy way has not been added yet. BUG=476800 Review URL: https://codereview.chromium.org/1092223004 Cr-Commit-Position: refs/heads/master@{#328481}
Diffstat (limited to 'third_party/libaddressinput')
-rw-r--r--third_party/libaddressinput/chromium/chrome_storage_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl.cc b/third_party/libaddressinput/chromium/chrome_storage_impl.cc
index 6c559bb..8fd5da4 100644
--- a/third_party/libaddressinput/chromium/chrome_storage_impl.cc
+++ b/third_party/libaddressinput/chromium/chrome_storage_impl.cc
@@ -25,7 +25,8 @@ void ChromeStorageImpl::Put(const std::string& key, std::string* data) {
scoped_ptr<base::StringValue> string_value(
new base::StringValue(std::string()));
string_value->GetString()->swap(*owned_data);
- backing_store_->SetValue(key, string_value.release());
+ backing_store_->SetValue(key, string_value.release(),
+ WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
void ChromeStorageImpl::Get(const std::string& key,