OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
Bernhard Bauer
2014/07/08 21:47:21
Update copyright?
mef
2014/07/09 12:12:03
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ | |
6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
Bernhard Bauer
2014/07/08 21:47:20
Nit: empty line between system and regular include
mef
2014/07/09 12:12:04
Done.
| |
10 #include "base/basictypes.h" | |
11 #include "base/prefs/pref_change_registrar.h" | |
12 #include "chrome/common/pref_names.h" | |
13 #include "components/pref_registry/pref_registry_syncable.h" | |
14 #include "content/public/browser/browser_thread.h" | |
15 #include "net/http/http_server_properties_manager.h" | |
16 | |
17 class PrefService; | |
18 | |
19 namespace user_prefs { | |
20 class PrefRegistrySyncable; | |
21 } | |
22 | |
23 namespace chrome_browser_net { | |
24 | |
25 using content::BrowserThread; | |
26 | |
27 //////////////////////////////////////////////////////////////////////////////// | |
28 // Class for registration and creation of HttpServerPropertiesManager | |
29 class HttpServerPropertiesManagerFactory { | |
30 public: | |
31 // Create an instance of HttpServerPropertiesManager. | |
32 static net::HttpServerPropertiesManager* CreateManager( | |
33 PrefService* pref_service) { | |
34 return new net::HttpServerPropertiesManager( | |
Bernhard Bauer
2014/07/08 21:47:21
I'm sorry that this will mean that you'll have to
mef
2014/07/09 12:12:03
Done.
| |
35 pref_service, | |
36 prefs::kHttpServerProperties, | |
37 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | |
38 } | |
39 | |
40 // Register |prefs| for properties managed by HttpServerPropertiesManager. | |
Bernhard Bauer
2014/07/08 21:47:20
|registry|?
mef
2014/07/09 12:12:04
Done. I think we are registering prefs in |registr
Bernhard Bauer
2014/07/09 12:24:43
Yeah, this way it makes more sense. Thanks!
| |
41 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | |
42 registry->RegisterDictionaryPref( | |
43 prefs::kHttpServerProperties, | |
44 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
45 } | |
Bernhard Bauer
2014/07/08 21:47:21
private:
DISALLOW_IMPLICIT_CONSTRUCTORS?
mef
2014/07/09 12:12:03
Done.
| |
46 }; | |
47 | |
48 } // namespace chrome_browser_net | |
49 | |
50 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ | |
OLD | NEW |