OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_factory.h" | 5 #include "chrome/browser/net/http_server_properties_manager_factory.h" |
6 | 6 |
7 #include "base/prefs/pref_change_registrar.h" | |
8 #include "base/prefs/pref_service.h" | |
9 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
10 #include "components/pref_registry/pref_registry_syncable.h" | 8 #include "components/pref_registry/pref_registry_syncable.h" |
| 9 #include "components/prefs/pref_change_registrar.h" |
| 10 #include "components/prefs/pref_service.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "net/http/http_server_properties_manager.h" | 12 #include "net/http/http_server_properties_manager.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Connects the HttpServerPropertiesManager's storage to the Chrome prefs. | 16 // Connects the HttpServerPropertiesManager's storage to the Chrome prefs. |
17 class PrefServiceAdapter | 17 class PrefServiceAdapter |
18 : public net::HttpServerPropertiesManager::PrefDelegate { | 18 : public net::HttpServerPropertiesManager::PrefDelegate { |
19 public: | 19 public: |
20 explicit PrefServiceAdapter(PrefService* pref_service) | 20 explicit PrefServiceAdapter(PrefService* pref_service) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 66 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
67 } | 67 } |
68 | 68 |
69 /* static */ | 69 /* static */ |
70 void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( | 70 void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( |
71 user_prefs::PrefRegistrySyncable* registry) { | 71 user_prefs::PrefRegistrySyncable* registry) { |
72 registry->RegisterDictionaryPref(prefs::kHttpServerProperties); | 72 registry->RegisterDictionaryPref(prefs::kHttpServerProperties); |
73 } | 73 } |
74 | 74 |
75 } // namespace chrome_browser_net | 75 } // namespace chrome_browser_net |
OLD | NEW |