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 "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
8 #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" | 9 #include "components/prefs/pref_change_registrar.h" |
10 #include "components/prefs/pref_service.h" | 10 #include "components/prefs/pref_service.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } // namespace | 56 } // namespace |
57 | 57 |
58 namespace chrome_browser_net { | 58 namespace chrome_browser_net { |
59 | 59 |
60 /* static */ | 60 /* static */ |
61 net::HttpServerPropertiesManager* | 61 net::HttpServerPropertiesManager* |
62 HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service) { | 62 HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service) { |
63 using content::BrowserThread; | 63 using content::BrowserThread; |
64 return new net::HttpServerPropertiesManager( | 64 return new net::HttpServerPropertiesManager( |
65 new PrefServiceAdapter(pref_service), // Transfers ownership. | 65 new PrefServiceAdapter(pref_service), // Transfers ownership. |
66 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 66 BrowserThread::GetTaskRunnerForThread(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 |