| 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 |
| 73 void OverlayPersistentPrefStore::ReportValueChanged(const std::string& key) { | 77 void OverlayPersistentPrefStore::ReportValueChanged(const std::string& key) { |
| 74 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); | 78 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); |
| 75 } | 79 } |
| 76 | 80 |
| 77 void OverlayPersistentPrefStore::OnPrefValueChanged(const std::string& key) { | 81 void OverlayPersistentPrefStore::OnPrefValueChanged(const std::string& key) { |
| 78 if (!overlay_.GetValue(key, NULL)) | 82 if (!overlay_.GetValue(key, NULL)) |
| 79 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); | 83 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); |
| 80 } | 84 } |
| 81 | 85 |
| 82 void OverlayPersistentPrefStore::OnInitializationCompleted() { | 86 void OverlayPersistentPrefStore::OnInitializationCompleted() { |
| 83 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, | 87 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, |
| 84 OnInitializationCompleted()); | 88 OnInitializationCompleted()); |
| 85 } | 89 } |
| OLD | NEW |