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

Side by Side Diff: android_webview/browser/aw_pref_store.cc

Issue 81183005: Remove JsonPrefStore pruning of empty values on write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove else Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « android_webview/browser/aw_pref_store.h ('k') | base/prefs/json_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "android_webview/browser/aw_pref_store.h" 5 #include "android_webview/browser/aw_pref_store.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 9
10 AwPrefStore::AwPrefStore() {} 10 AwPrefStore::AwPrefStore() {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 void AwPrefStore::SetValueSilently(const std::string& key, Value* value) { 46 void AwPrefStore::SetValueSilently(const std::string& key, Value* value) {
47 prefs_.SetValue(key, value); 47 prefs_.SetValue(key, value);
48 } 48 }
49 49
50 void AwPrefStore::RemoveValue(const std::string& key) { 50 void AwPrefStore::RemoveValue(const std::string& key) {
51 if (prefs_.RemoveValue(key)) 51 if (prefs_.RemoveValue(key))
52 ReportValueChanged(key); 52 ReportValueChanged(key);
53 } 53 }
54 54
55 void AwPrefStore::MarkNeedsEmptyValue(const std::string& key) {
56 }
57
58 bool AwPrefStore::ReadOnly() const { 55 bool AwPrefStore::ReadOnly() const {
59 return false; 56 return false;
60 } 57 }
61 58
62 PersistentPrefStore::PrefReadError AwPrefStore::GetReadError() const { 59 PersistentPrefStore::PrefReadError AwPrefStore::GetReadError() const {
63 return PersistentPrefStore::PREF_READ_ERROR_NONE; 60 return PersistentPrefStore::PREF_READ_ERROR_NONE;
64 } 61 }
65 62
66 PersistentPrefStore::PrefReadError AwPrefStore::ReadPrefs() { 63 PersistentPrefStore::PrefReadError AwPrefStore::ReadPrefs() {
67 return PersistentPrefStore::PREF_READ_ERROR_NONE; 64 return PersistentPrefStore::PREF_READ_ERROR_NONE;
68 } 65 }
69 66
70 void AwPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate_raw) { 67 void AwPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate_raw) {
71 } 68 }
72 69
73 void AwPrefStore::ReportValueChanged(const std::string& key) { 70 void AwPrefStore::ReportValueChanged(const std::string& key) {
74 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key)); 71 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
75 } 72 }
OLDNEW
« no previous file with comments | « android_webview/browser/aw_pref_store.h ('k') | base/prefs/json_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698