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 #include "chrome/browser/net/http_server_properties_manager.h" | 4 #include "chrome/browser/net/http_server_properties_manager.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void HttpServerPropertiesManager::ShutdownOnUIThread() { | 83 void HttpServerPropertiesManager::ShutdownOnUIThread() { |
84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
85 // Cancel any pending updates, and stop listening for pref change updates. | 85 // Cancel any pending updates, and stop listening for pref change updates. |
86 ui_cache_update_timer_->Stop(); | 86 ui_cache_update_timer_->Stop(); |
87 ui_weak_ptr_factory_.reset(); | 87 ui_weak_ptr_factory_.reset(); |
88 pref_change_registrar_.RemoveAll(); | 88 pref_change_registrar_.RemoveAll(); |
89 } | 89 } |
90 | 90 |
91 // static | 91 // static |
92 void HttpServerPropertiesManager::RegisterPrefs(PrefService* prefs) { | 92 void HttpServerPropertiesManager::RegisterPrefs(PrefServiceSyncable* prefs) { |
93 prefs->RegisterDictionaryPref(prefs::kHttpServerProperties, | 93 prefs->RegisterDictionaryPref(prefs::kHttpServerProperties, |
94 PrefService::UNSYNCABLE_PREF); | 94 PrefServiceSyncable::UNSYNCABLE_PREF); |
95 } | 95 } |
96 | 96 |
97 // This is required for conformance with the HttpServerProperties interface. | 97 // This is required for conformance with the HttpServerProperties interface. |
98 void HttpServerPropertiesManager::Clear() { | 98 void HttpServerPropertiesManager::Clear() { |
99 Clear(base::Closure()); | 99 Clear(base::Closure()); |
100 } | 100 } |
101 | 101 |
102 void HttpServerPropertiesManager::Clear(const base::Closure& completion) { | 102 void HttpServerPropertiesManager::Clear(const base::Closure& completion) { |
103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
104 | 104 |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 completion.Run(); | 659 completion.Run(); |
660 } | 660 } |
661 | 661 |
662 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 662 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
663 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 663 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
664 if (!setting_prefs_) | 664 if (!setting_prefs_) |
665 ScheduleUpdateCacheOnUI(); | 665 ScheduleUpdateCacheOnUI(); |
666 } | 666 } |
667 | 667 |
668 } // namespace chrome_browser_net | 668 } // namespace chrome_browser_net |
OLD | NEW |