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/pref_set_observer.h" | 5 #include "chrome/browser/prefs/pref_set_observer.h" |
6 | 6 |
7 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
8 #include "content/common/notification_type.h" | 8 #include "content/common/content_notification_types.h" |
9 | 9 |
10 PrefSetObserver::PrefSetObserver(PrefService* pref_service, | 10 PrefSetObserver::PrefSetObserver(PrefService* pref_service, |
11 NotificationObserver* observer) | 11 NotificationObserver* observer) |
12 : pref_service_(pref_service), | 12 : pref_service_(pref_service), |
13 observer_(observer) { | 13 observer_(observer) { |
14 registrar_.Init(pref_service); | 14 registrar_.Init(pref_service); |
15 } | 15 } |
16 | 16 |
17 PrefSetObserver::~PrefSetObserver() {} | 17 PrefSetObserver::~PrefSetObserver() {} |
18 | 18 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 pref_set->AddPref(prefs::kDefaultSearchProviderKeyword); | 62 pref_set->AddPref(prefs::kDefaultSearchProviderKeyword); |
63 pref_set->AddPref(prefs::kDefaultSearchProviderSearchURL); | 63 pref_set->AddPref(prefs::kDefaultSearchProviderSearchURL); |
64 pref_set->AddPref(prefs::kDefaultSearchProviderSuggestURL); | 64 pref_set->AddPref(prefs::kDefaultSearchProviderSuggestURL); |
65 pref_set->AddPref(prefs::kDefaultSearchProviderIconURL); | 65 pref_set->AddPref(prefs::kDefaultSearchProviderIconURL); |
66 pref_set->AddPref(prefs::kDefaultSearchProviderInstantURL); | 66 pref_set->AddPref(prefs::kDefaultSearchProviderInstantURL); |
67 pref_set->AddPref(prefs::kDefaultSearchProviderEncodings); | 67 pref_set->AddPref(prefs::kDefaultSearchProviderEncodings); |
68 | 68 |
69 return pref_set; | 69 return pref_set; |
70 } | 70 } |
71 | 71 |
72 void PrefSetObserver::Observe(NotificationType type, | 72 void PrefSetObserver::Observe(int type, |
73 const NotificationSource& source, | 73 const NotificationSource& source, |
74 const NotificationDetails& details) { | 74 const NotificationDetails& details) { |
75 if (observer_) | 75 if (observer_) |
76 observer_->Observe(type, source, details); | 76 observer_->Observe(type, source, details); |
77 } | 77 } |
OLD | NEW |