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

Side by Side Diff: net/http/http_server_properties_impl.cc

Issue 26308002: Fix some WeakPtrFactory members that aren't last (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix weak ptr initialization Created 7 years, 2 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
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/ssl/server_bound_cert_service.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 (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 #include "net/http/http_server_properties_impl.h" 5 #include "net/http/http_server_properties_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "net/http/http_pipelined_host_capability.h" 11 #include "net/http/http_pipelined_host_capability.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 // TODO(simonjam): Run experiments with different values of this to see what 15 // TODO(simonjam): Run experiments with different values of this to see what
16 // value is good at avoiding evictions without eating too much memory. Until 16 // value is good at avoiding evictions without eating too much memory. Until
17 // then, this is just a bad guess. 17 // then, this is just a bad guess.
18 static const int kDefaultNumHostsToRemember = 200; 18 static const int kDefaultNumHostsToRemember = 200;
19 19
20 HttpServerPropertiesImpl::HttpServerPropertiesImpl() 20 HttpServerPropertiesImpl::HttpServerPropertiesImpl()
21 : weak_ptr_factory_(this), 21 : pipeline_capability_map_(
22 pipeline_capability_map_( 22 new CachedPipelineCapabilityMap(kDefaultNumHostsToRemember)),
23 new CachedPipelineCapabilityMap(kDefaultNumHostsToRemember)) { 23 weak_ptr_factory_(this) {
24 } 24 }
25 25
26 HttpServerPropertiesImpl::~HttpServerPropertiesImpl() { 26 HttpServerPropertiesImpl::~HttpServerPropertiesImpl() {
27 } 27 }
28 28
29 void HttpServerPropertiesImpl::InitializeSpdyServers( 29 void HttpServerPropertiesImpl::InitializeSpdyServers(
30 std::vector<std::string>* spdy_servers, 30 std::vector<std::string>* spdy_servers,
31 bool support_spdy) { 31 bool support_spdy) {
32 DCHECK(CalledOnValidThread()); 32 DCHECK(CalledOnValidThread());
33 spdy_servers_table_.clear(); 33 spdy_servers_table_.clear();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 PipelineCapabilityMap result; 294 PipelineCapabilityMap result;
295 CachedPipelineCapabilityMap::const_iterator it; 295 CachedPipelineCapabilityMap::const_iterator it;
296 for (it = pipeline_capability_map_->begin(); 296 for (it = pipeline_capability_map_->begin();
297 it != pipeline_capability_map_->end(); ++it) { 297 it != pipeline_capability_map_->end(); ++it) {
298 result[it->first] = it->second; 298 result[it->first] = it->second;
299 } 299 }
300 return result; 300 return result;
301 } 301 }
302 302
303 } // namespace net 303 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/ssl/server_bound_cert_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698