OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/pref_change_registrar.h" | 5 #include "chrome/browser/api/prefs/pref_change_registrar.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 | 9 |
10 PrefChangeRegistrar::PrefChangeRegistrar() : service_(NULL) {} | 10 PrefChangeRegistrar::PrefChangeRegistrar() : service_(NULL) {} |
11 | 11 |
12 PrefChangeRegistrar::~PrefChangeRegistrar() { | 12 PrefChangeRegistrar::~PrefChangeRegistrar() { |
13 // If you see an invalid memory access in this destructor, this | 13 // If you see an invalid memory access in this destructor, this |
14 // PrefChangeRegistrar might be subscribed to an OffTheRecordProfileImpl that | 14 // PrefChangeRegistrar might be subscribed to an OffTheRecordProfileImpl that |
15 // has been destroyed. This should not happen any more but be warned. | 15 // has been destroyed. This should not happen any more but be warned. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 it != observers_.end(); ++it) { | 60 it != observers_.end(); ++it) { |
61 service_->RemovePrefObserver(it->first.c_str(), it->second); | 61 service_->RemovePrefObserver(it->first.c_str(), it->second); |
62 } | 62 } |
63 observers_.clear(); | 63 observers_.clear(); |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 bool PrefChangeRegistrar::IsEmpty() const { | 67 bool PrefChangeRegistrar::IsEmpty() const { |
68 return observers_.empty(); | 68 return observers_.empty(); |
69 } | 69 } |
OLD | NEW |