| OLD | NEW |
| 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 #include "net/ssl/channel_id_service.h" | 5 #include "net/ssl/channel_id_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 : channel_id_store_(channel_id_store), | 278 : channel_id_store_(channel_id_store), |
| 279 task_runner_(task_runner), | 279 task_runner_(task_runner), |
| 280 id_(g_next_id.GetNext()), | 280 id_(g_next_id.GetNext()), |
| 281 requests_(0), | 281 requests_(0), |
| 282 key_store_hits_(0), | 282 key_store_hits_(0), |
| 283 inflight_joins_(0), | 283 inflight_joins_(0), |
| 284 workers_created_(0), | 284 workers_created_(0), |
| 285 weak_ptr_factory_(this) {} | 285 weak_ptr_factory_(this) {} |
| 286 | 286 |
| 287 ChannelIDService::~ChannelIDService() { | 287 ChannelIDService::~ChannelIDService() { |
| 288 STLDeleteValues(&inflight_); | 288 base::STLDeleteValues(&inflight_); |
| 289 } | 289 } |
| 290 | 290 |
| 291 // static | 291 // static |
| 292 std::string ChannelIDService::GetDomainForHost(const std::string& host) { | 292 std::string ChannelIDService::GetDomainForHost(const std::string& host) { |
| 293 std::string domain = | 293 std::string domain = |
| 294 registry_controlled_domains::GetDomainAndRegistry( | 294 registry_controlled_domains::GetDomainAndRegistry( |
| 295 host, registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); | 295 host, registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); |
| 296 if (domain.empty()) | 296 if (domain.empty()) |
| 297 return host; | 297 return host; |
| 298 return domain; | 298 return domain; |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 return err; | 523 return err; |
| 524 } | 524 } |
| 525 | 525 |
| 526 int ChannelIDService::channel_id_count() { | 526 int ChannelIDService::channel_id_count() { |
| 527 return channel_id_store_->GetChannelIDCount(); | 527 return channel_id_store_->GetChannelIDCount(); |
| 528 } | 528 } |
| 529 | 529 |
| 530 } // namespace net | 530 } // namespace net |
| OLD | NEW |