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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 24
24 namespace chrome_browser_net { 25 namespace chrome_browser_net {
25 26
26 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
27 // HttpServerPropertiesManager 28 // HttpServerPropertiesManager
28 29
29 // The manager for creating and updating an HttpServerProperties (for example it 30 // The manager for creating and updating an HttpServerProperties (for example it
30 // tracks if a server supports SPDY or not). 31 // tracks if a server supports SPDY or not).
31 // 32 //
32 // 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
56 57
57 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO 58 // Initialize |http_server_properties_impl_| and |io_method_factory_| on IO
58 // 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
59 // from |pref_service_|. 60 // from |pref_service_|.
60 void InitializeOnIOThread(); 61 void InitializeOnIOThread();
61 62
62 // 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.
63 void ShutdownOnUIThread(); 64 void ShutdownOnUIThread();
64 65
65 // Register |prefs| for properties managed here. 66 // Register |prefs| for properties managed here.
66 static void RegisterPrefs(PrefService* prefs); 67 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
67 68
68 // Deletes all data. Works asynchronously, but if a |completion| callback is 69 // Deletes all data. Works asynchronously, but if a |completion| callback is
69 // 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.
70 void Clear(const base::Closure& completion); 71 void Clear(const base::Closure& completion);
71 72
72 // ---------------------------------- 73 // ----------------------------------
73 // net::HttpServerProperties methods: 74 // net::HttpServerProperties methods:
74 // ---------------------------------- 75 // ----------------------------------
75 76
76 // Deletes all data. Works asynchronously. 77 // Deletes all data. Works asynchronously.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 io_prefs_update_timer_; 223 io_prefs_update_timer_;
223 224
224 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; 225 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_;
225 226
226 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 227 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
227 }; 228 };
228 229
229 } // namespace chrome_browser_net 230 } // namespace chrome_browser_net
230 231
231 #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/variations/variations_service_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