OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/prefs/overlay_persistent_pref_store.h" | 5 #include "chrome/browser/prefs/overlay_persistent_pref_store.h" |
6 | 6 |
7 OverlayPersistentPrefStore::OverlayPersistentPrefStore( | 7 OverlayPersistentPrefStore::OverlayPersistentPrefStore( |
8 PersistentPrefStore* underlay) | 8 PersistentPrefStore* underlay) |
9 : underlay_(underlay) { | 9 : underlay_(underlay) { |
10 underlay_->AddObserver(this); | 10 underlay_->AddObserver(this); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 bool OverlayPersistentPrefStore::WritePrefs() { | 64 bool OverlayPersistentPrefStore::WritePrefs() { |
65 // We do not write intentionally. | 65 // We do not write intentionally. |
66 return true; | 66 return true; |
67 } | 67 } |
68 | 68 |
69 void OverlayPersistentPrefStore::ScheduleWritePrefs() { | 69 void OverlayPersistentPrefStore::ScheduleWritePrefs() { |
70 // We do not write intentionally. | 70 // We do not write intentionally. |
71 } | 71 } |
72 | 72 |
| 73 void OverlayPersistentPrefStore::CommitPendingWrite() { |
| 74 // We do not write intentionally. |
| 75 } |
| 76 |
| 77 void OverlayPersistentPrefStore::SetNotificationSource( |
| 78 const NotificationSource& source) { |
| 79 // We do not care about PREF_COMMITTED notification and its source. |
| 80 } |
| 81 |
73 void OverlayPersistentPrefStore::ReportValueChanged(const std::string& key) { | 82 void OverlayPersistentPrefStore::ReportValueChanged(const std::string& key) { |
74 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); | 83 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); |
75 } | 84 } |
76 | 85 |
77 void OverlayPersistentPrefStore::OnPrefValueChanged(const std::string& key) { | 86 void OverlayPersistentPrefStore::OnPrefValueChanged(const std::string& key) { |
78 if (!overlay_.GetValue(key, NULL)) | 87 if (!overlay_.GetValue(key, NULL)) |
79 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); | 88 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); |
80 } | 89 } |
81 | 90 |
82 void OverlayPersistentPrefStore::OnInitializationCompleted() { | 91 void OverlayPersistentPrefStore::OnInitializationCompleted() { |
83 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, | 92 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, |
84 OnInitializationCompleted()); | 93 OnInitializationCompleted()); |
85 } | 94 } |
OLD | NEW |