| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/net/http_server_properties_manager_factory.h" | 5 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" |
| 6 | 6 |
| 7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const std::string path_; | 48 const std::string path_; |
| 49 PrefChangeRegistrar pref_change_registrar_; | 49 PrefChangeRegistrar pref_change_registrar_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(PrefServiceAdapter); | 51 DISALLOW_COPY_AND_ASSIGN(PrefServiceAdapter); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 // static | 56 // static |
| 57 net::HttpServerPropertiesManager* | 57 net::HttpServerPropertiesManager* |
| 58 HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service) { | 58 HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service, |
| 59 net::NetLog* net_log) { |
| 59 return new net::HttpServerPropertiesManager( | 60 return new net::HttpServerPropertiesManager( |
| 60 new PrefServiceAdapter(pref_service), // Transfers ownership. | 61 new PrefServiceAdapter(pref_service), // Transfers ownership. |
| 61 base::ThreadTaskRunnerHandle::Get(), | 62 base::ThreadTaskRunnerHandle::Get(), |
| 62 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO)); | 63 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), net_log); |
| 63 } | 64 } |
| 64 | 65 |
| 65 // static | 66 // static |
| 66 void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( | 67 void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( |
| 67 user_prefs::PrefRegistrySyncable* registry) { | 68 user_prefs::PrefRegistrySyncable* registry) { |
| 68 registry->RegisterDictionaryPref(prefs::kHttpServerProperties); | 69 registry->RegisterDictionaryPref(prefs::kHttpServerProperties); |
| 69 } | 70 } |
| OLD | NEW |