Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: chrome/browser/net/http_server_properties_manager.h

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 4
5 #ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ 5 #ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_
6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ 6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/prefs/public/pref_change_registrar.h" 14 #include "base/prefs/public/pref_change_registrar.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "net/base/host_port_pair.h" 17 #include "net/base/host_port_pair.h"
18 #include "net/http/http_pipelined_host_capability.h" 18 #include "net/http/http_pipelined_host_capability.h"
19 #include "net/http/http_server_properties.h" 19 #include "net/http/http_server_properties.h"
20 #include "net/http/http_server_properties_impl.h" 20 #include "net/http/http_server_properties_impl.h"
21 21
22 class PrefService; 22 class PrefService;
23 class PrefServiceSyncable; 23 class PrefRegistrySyncable;
24 24
25 namespace chrome_browser_net { 25 namespace chrome_browser_net {
26 26
27 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
28 // HttpServerPropertiesManager 28 // HttpServerPropertiesManager
29 29
30 // The manager for creating and updating an HttpServerProperties (for example it 30 // The manager for creating and updating an HttpServerProperties (for example it
31 // tracks if a server supports SPDY or not). 31 // tracks if a server supports SPDY or not).
32 // 32 //
33 // This class interacts with both the UI thread, where notifications of pref 33 // This class interacts with both the UI thread, where notifications of pref
(...skipping 23 matching lines...) Expand all
57 57
58 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO 58 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO
59 // thread. It also posts a task to UI thread to get SPDY Server preferences 59 // thread. It also posts a task to UI thread to get SPDY Server preferences
60 // from |pref_service_|. 60 // from |pref_service_|.
61 void InitializeOnIOThread(); 61 void InitializeOnIOThread();
62 62
63 // Prepare for shutdown. Must be called on the UI thread, before destruction. 63 // Prepare for shutdown. Must be called on the UI thread, before destruction.
64 void ShutdownOnUIThread(); 64 void ShutdownOnUIThread();
65 65
66 // Register |prefs| for properties managed here. 66 // Register |prefs| for properties managed here.
67 static void RegisterUserPrefs(PrefServiceSyncable* prefs); 67 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
68 68
69 // Deletes all data. Works asynchronously, but if a |completion| callback is 69 // Deletes all data. Works asynchronously, but if a |completion| callback is
70 // provided, it will be fired on the UI thread when everything is done. 70 // provided, it will be fired on the UI thread when everything is done.
71 void Clear(const base::Closure& completion); 71 void Clear(const base::Closure& completion);
72 72
73 // ---------------------------------- 73 // ----------------------------------
74 // net::HttpServerProperties methods: 74 // net::HttpServerProperties methods:
75 // ---------------------------------- 75 // ----------------------------------
76 76
77 // Deletes all data. Works asynchronously. 77 // Deletes all data. Works asynchronously.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 io_prefs_update_timer_; 223 io_prefs_update_timer_;
224 224
225 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; 225 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_;
226 226
227 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 227 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
228 }; 228 };
229 229
230 } // namespace chrome_browser_net 230 } // namespace chrome_browser_net
231 231
232 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ 232 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/net/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698