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

Side by Side Diff: net/http/http_server_properties_manager.h

Issue 2171743002: Do not persist HttpServerProperties to disk that often. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #7. Created 4 years, 5 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
OLDNEW
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 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 // -------------- 308 // --------------
309 // Network thread 309 // Network thread
310 // -------------- 310 // --------------
311 311
312 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_; 312 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_;
313 313
314 // Used to post |prefs::kHttpServerProperties| pref update tasks. 314 // Used to post |prefs::kHttpServerProperties| pref update tasks.
315 std::unique_ptr<base::OneShotTimer> network_prefs_update_timer_; 315 std::unique_ptr<base::OneShotTimer> network_prefs_update_timer_;
316 316
317 // Time of last UpdatePrefsFromCacheOnNetworkThread() execution.
318 base::Time last_update_prefs_from_cache_;
319
317 std::unique_ptr<HttpServerPropertiesImpl> http_server_properties_impl_; 320 std::unique_ptr<HttpServerPropertiesImpl> http_server_properties_impl_;
318 321
319 // Used to get |weak_ptr_| to self on the pref thread. 322 // Used to get |weak_ptr_| to self on the pref thread.
320 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> 323 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>>
321 pref_weak_ptr_factory_; 324 pref_weak_ptr_factory_;
322 325
323 // Used to get |weak_ptr_| to self on the network thread. 326 // Used to get |weak_ptr_| to self on the network thread.
324 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> 327 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>>
325 network_weak_ptr_factory_; 328 network_weak_ptr_factory_;
326 329
327 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 330 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
328 }; 331 };
329 332
330 } // namespace net 333 } // namespace net
331 334
332 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 335 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698