| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/media/webrtc_identity_store.h" | 5 #include "content/browser/media/webrtc_identity_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 | 165 |
| 166 WebRTCIdentityStore* store_; | 166 WebRTCIdentityStore* store_; |
| 167 WebRTCIdentityRequest* request_; | 167 WebRTCIdentityRequest* request_; |
| 168 WebRTCIdentityStore::CompletionCallback callback_; | 168 WebRTCIdentityStore::CompletionCallback callback_; |
| 169 | 169 |
| 170 DISALLOW_COPY_AND_ASSIGN(WebRTCIdentityRequestHandle); | 170 DISALLOW_COPY_AND_ASSIGN(WebRTCIdentityRequestHandle); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 WebRTCIdentityStore::WebRTCIdentityStore(const base::FilePath& path, | 173 WebRTCIdentityStore::WebRTCIdentityStore(const base::FilePath& path, |
| 174 quota::SpecialStoragePolicy* policy) | 174 storage::SpecialStoragePolicy* policy) |
| 175 : validity_period_(base::TimeDelta::FromDays(30)), | 175 : validity_period_(base::TimeDelta::FromDays(30)), |
| 176 task_runner_(base::WorkerPool::GetTaskRunner(true)), | 176 task_runner_(base::WorkerPool::GetTaskRunner(true)), |
| 177 backend_(new WebRTCIdentityStoreBackend(path, policy, validity_period_)) { | 177 backend_(new WebRTCIdentityStoreBackend(path, policy, validity_period_)) { |
| 178 } | 178 } |
| 179 | 179 |
| 180 WebRTCIdentityStore::~WebRTCIdentityStore() { backend_->Close(); } | 180 WebRTCIdentityStore::~WebRTCIdentityStore() { backend_->Close(); } |
| 181 | 181 |
| 182 base::Closure WebRTCIdentityStore::RequestIdentity( | 182 base::Closure WebRTCIdentityStore::RequestIdentity( |
| 183 const GURL& origin, | 183 const GURL& origin, |
| 184 const std::string& identity_name, | 184 const std::string& identity_name, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 if (in_flight_requests_[i]->origin_ == origin && | 306 if (in_flight_requests_[i]->origin_ == origin && |
| 307 in_flight_requests_[i]->identity_name_ == identity_name && | 307 in_flight_requests_[i]->identity_name_ == identity_name && |
| 308 in_flight_requests_[i]->common_name_ == common_name) { | 308 in_flight_requests_[i]->common_name_ == common_name) { |
| 309 return in_flight_requests_[i]; | 309 return in_flight_requests_[i]; |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 return NULL; | 312 return NULL; |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace content | 315 } // namespace content |
| OLD | NEW |