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

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

Issue 27500004: Listen for new system certificates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review. 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
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 void SpdySessionPool::OnCertTrustChanged(const X509Certificate* cert) { 296 void SpdySessionPool::OnCertTrustChanged(const X509Certificate* cert) {
297 // Per wtc, we actually only need to CloseCurrentSessions when trust is 297 // Per wtc, we actually only need to CloseCurrentSessions when trust is
298 // reduced. CloseCurrentSessions now because OnCertTrustChanged does not 298 // reduced. CloseCurrentSessions now because OnCertTrustChanged does not
299 // tell us this. 299 // tell us this.
300 // See comments in ClientSocketPoolManager::OnCertTrustChanged. 300 // See comments in ClientSocketPoolManager::OnCertTrustChanged.
301 CloseCurrentSessions(ERR_NETWORK_CHANGED); 301 CloseCurrentSessions(ERR_NETWORK_CHANGED);
302 } 302 }
303 303
304 void SpdySessionPool::OnDatabaseChanged() {
305 // Per wtc, we actually only need to CloseCurrentSessions when trust is
306 // reduced. CloseCurrentSessions now because OnDatabaseChanged does not
307 // tell us this.
308 // See comments in ClientSocketPoolManager::OnCertTrustChanged.
309 CloseCurrentSessions(ERR_NETWORK_CHANGED);
310 }
311
304 bool SpdySessionPool::IsSessionAvailable( 312 bool SpdySessionPool::IsSessionAvailable(
305 const base::WeakPtr<SpdySession>& session) const { 313 const base::WeakPtr<SpdySession>& session) const {
306 for (AvailableSessionMap::const_iterator it = available_sessions_.begin(); 314 for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
307 it != available_sessions_.end(); ++it) { 315 it != available_sessions_.end(); ++it) {
308 if (it->second.get() == session.get()) 316 if (it->second.get() == session.get())
309 return true; 317 return true;
310 } 318 }
311 return false; 319 return false;
312 } 320 }
313 321
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 if (idle_only && (*it)->is_active()) 393 if (idle_only && (*it)->is_active())
386 continue; 394 continue;
387 395
388 (*it)->CloseSessionOnError(error, description); 396 (*it)->CloseSessionOnError(error, description);
389 DCHECK(!IsSessionAvailable(*it)); 397 DCHECK(!IsSessionAvailable(*it));
390 DCHECK(!*it); 398 DCHECK(!*it);
391 } 399 }
392 } 400 }
393 401
394 } // namespace net 402 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698