OLD | NEW |
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_credential_state.h" | 5 #include "net/spdy/spdy_credential_state.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "net/base/server_bound_cert_service.h" | 9 #include "net/ssl/server_bound_cert_service.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 GURL GetCanonicalOrigin(const GURL& url) { | 15 GURL GetCanonicalOrigin(const GURL& url) { |
16 std::string domain = | 16 std::string domain = |
17 ServerBoundCertService::GetDomainForHost(url.host()); | 17 ServerBoundCertService::GetDomainForHost(url.host()); |
18 DCHECK(!domain.empty()); | 18 DCHECK(!domain.empty()); |
19 if (domain == url.host()) | 19 if (domain == url.host()) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 return kNoEntry; | 60 return kNoEntry; |
61 } | 61 } |
62 | 62 |
63 void SpdyCredentialState::Resize(size_t size) { | 63 void SpdyCredentialState::Resize(size_t size) { |
64 slots_.resize(size); | 64 slots_.resize(size); |
65 if (last_added_ >= slots_.size()) | 65 if (last_added_ >= slots_.size()) |
66 last_added_ = slots_.size() - 1; | 66 last_added_ = slots_.size() - 1; |
67 } | 67 } |
68 | 68 |
69 } // namespace net | 69 } // namespace net |
OLD | NEW |