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

Side by Side Diff: net/spdy/spdy_session_pool.cc

Issue 215023002: Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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/spdy/spdy_session_key.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('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/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const SpdySessionKey& SpdySessionPool::NormalizeListKey( 316 const SpdySessionKey& SpdySessionPool::NormalizeListKey(
317 const SpdySessionKey& key) const { 317 const SpdySessionKey& key) const {
318 if (!force_single_domain_) 318 if (!force_single_domain_)
319 return key; 319 return key;
320 320
321 static SpdySessionKey* single_domain_key = NULL; 321 static SpdySessionKey* single_domain_key = NULL;
322 if (!single_domain_key) { 322 if (!single_domain_key) {
323 HostPortPair single_domain = HostPortPair("singledomain.com", 80); 323 HostPortPair single_domain = HostPortPair("singledomain.com", 80);
324 single_domain_key = new SpdySessionKey(single_domain, 324 single_domain_key = new SpdySessionKey(single_domain,
325 ProxyServer::Direct(), 325 ProxyServer::Direct(),
326 kPrivacyModeDisabled); 326 PRIVACY_MODE_DISABLED);
327 } 327 }
328 return *single_domain_key; 328 return *single_domain_key;
329 } 329 }
330 330
331 void SpdySessionPool::MapKeyToAvailableSession( 331 void SpdySessionPool::MapKeyToAvailableSession(
332 const SpdySessionKey& key, 332 const SpdySessionKey& key,
333 const base::WeakPtr<SpdySession>& session) { 333 const base::WeakPtr<SpdySession>& session) {
334 DCHECK(ContainsKey(sessions_, session.get())); 334 DCHECK(ContainsKey(sessions_, session.get()));
335 const SpdySessionKey& normalized_key = NormalizeListKey(key); 335 const SpdySessionKey& normalized_key = NormalizeListKey(key);
336 std::pair<AvailableSessionMap::iterator, bool> result = 336 std::pair<AvailableSessionMap::iterator, bool> result =
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 if (idle_only && (*it)->is_active()) 387 if (idle_only && (*it)->is_active())
388 continue; 388 continue;
389 389
390 (*it)->CloseSessionOnError(error, description); 390 (*it)->CloseSessionOnError(error, description);
391 DCHECK(!IsSessionAvailable(*it)); 391 DCHECK(!IsSessionAvailable(*it));
392 DCHECK(!*it); 392 DCHECK(!*it);
393 } 393 }
394 } 394 }
395 395
396 } // namespace net 396 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_key.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698