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

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

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/http/http_transaction_test_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 private: 217 private:
218 void OnHttpServerPropertiesChanged(); 218 void OnHttpServerPropertiesChanged();
219 219
220 // ----------- 220 // -----------
221 // Pref thread 221 // Pref thread
222 // ----------- 222 // -----------
223 223
224 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_; 224 const scoped_refptr<base::SequencedTaskRunner> pref_task_runner_;
225 225
226 // Used to get |weak_ptr_| to self on the pref thread.
227 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
228 pref_weak_ptr_factory_;
229
230 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_; 226 base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_;
231 227
232 // Used to post cache update tasks. 228 // Used to post cache update tasks.
233 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > 229 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> >
234 pref_cache_update_timer_; 230 pref_cache_update_timer_;
235 231
236 // Used to track the spdy servers changes. 232 // Used to track the spdy servers changes.
237 PrefChangeRegistrar pref_change_registrar_; 233 PrefChangeRegistrar pref_change_registrar_;
238 PrefService* pref_service_; // Weak. 234 PrefService* pref_service_; // Weak.
239 bool setting_prefs_; 235 bool setting_prefs_;
240 const char* path_; 236 const char* path_;
241 237
242 // -------------- 238 // --------------
243 // Network thread 239 // Network thread
244 // -------------- 240 // --------------
245 241
246 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_; 242 const scoped_refptr<base::SequencedTaskRunner> network_task_runner_;
247 243
248 // Used to get |weak_ptr_| to self on the network thread.
249 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
250 network_weak_ptr_factory_;
251
252 // Used to post |prefs::kHttpServerProperties| pref update tasks. 244 // Used to post |prefs::kHttpServerProperties| pref update tasks.
253 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > 245 scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> >
254 network_prefs_update_timer_; 246 network_prefs_update_timer_;
255 247
256 scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_; 248 scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_;
257 249
250 // Used to get |weak_ptr_| to self on the pref thread.
251 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
252 pref_weak_ptr_factory_;
253
254 // Used to get |weak_ptr_| to self on the network thread.
255 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
256 network_weak_ptr_factory_;
257
258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
259 }; 259 };
260 260
261 } // namespace net 261 } // namespace net
262 262
263 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 263 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/http/http_transaction_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698