OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/http_server_properties_manager.h" | 5 #include "chrome/browser/net/http_server_properties_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 void HttpServerPropertiesManager::ShutdownOnUIThread() { | 86 void HttpServerPropertiesManager::ShutdownOnUIThread() { |
87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
88 // Cancel any pending updates, and stop listening for pref change updates. | 88 // Cancel any pending updates, and stop listening for pref change updates. |
89 ui_cache_update_timer_->Stop(); | 89 ui_cache_update_timer_->Stop(); |
90 ui_weak_ptr_factory_.reset(); | 90 ui_weak_ptr_factory_.reset(); |
91 pref_change_registrar_.RemoveAll(); | 91 pref_change_registrar_.RemoveAll(); |
92 } | 92 } |
93 | 93 |
94 // static | 94 // static |
95 void HttpServerPropertiesManager::RegisterUserPrefs( | 95 void HttpServerPropertiesManager::RegisterProfilePrefs( |
96 user_prefs::PrefRegistrySyncable* prefs) { | 96 user_prefs::PrefRegistrySyncable* prefs) { |
97 prefs->RegisterDictionaryPref( | 97 prefs->RegisterDictionaryPref( |
98 prefs::kHttpServerProperties, | 98 prefs::kHttpServerProperties, |
99 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 99 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
100 } | 100 } |
101 | 101 |
102 // static | 102 // static |
103 void HttpServerPropertiesManager::SetVersion( | 103 void HttpServerPropertiesManager::SetVersion( |
104 base::DictionaryValue* http_server_properties_dict, | 104 base::DictionaryValue* http_server_properties_dict, |
105 int version_number) { | 105 int version_number) { |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 completion.Run(); | 677 completion.Run(); |
678 } | 678 } |
679 | 679 |
680 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 680 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
682 if (!setting_prefs_) | 682 if (!setting_prefs_) |
683 ScheduleUpdateCacheOnUI(); | 683 ScheduleUpdateCacheOnUI(); |
684 } | 684 } |
685 | 685 |
686 } // namespace chrome_browser_net | 686 } // namespace chrome_browser_net |
OLD | NEW |