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 "extensions/browser/api/cast_channel/cast_channel_api.h" | 5 #include "extensions/browser/api/cast_channel/cast_channel_api.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void CastChannelAPI::SetPingTimeoutTimerForTest(scoped_ptr<base::Timer> timer) { | 153 void CastChannelAPI::SetPingTimeoutTimerForTest(scoped_ptr<base::Timer> timer) { |
154 injected_timeout_timer_ = timer.Pass(); | 154 injected_timeout_timer_ = timer.Pass(); |
155 } | 155 } |
156 | 156 |
157 scoped_ptr<base::Timer> CastChannelAPI::GetInjectedTimeoutTimerForTest() { | 157 scoped_ptr<base::Timer> CastChannelAPI::GetInjectedTimeoutTimerForTest() { |
158 return injected_timeout_timer_.Pass(); | 158 return injected_timeout_timer_.Pass(); |
159 } | 159 } |
160 | 160 |
161 CastChannelAPI::~CastChannelAPI() {} | 161 CastChannelAPI::~CastChannelAPI() {} |
162 | 162 |
163 CastChannelAsyncApiFunction::CastChannelAsyncApiFunction() : manager_(NULL) { | 163 CastChannelAsyncApiFunction::CastChannelAsyncApiFunction() : manager_(nullptr) { |
164 } | 164 } |
165 | 165 |
166 CastChannelAsyncApiFunction::~CastChannelAsyncApiFunction() { } | 166 CastChannelAsyncApiFunction::~CastChannelAsyncApiFunction() { } |
167 | 167 |
168 bool CastChannelAsyncApiFunction::PrePrepare() { | 168 bool CastChannelAsyncApiFunction::PrePrepare() { |
169 manager_ = ApiResourceManager<CastSocket>::Get(browser_context()); | 169 manager_ = ApiResourceManager<CastSocket>::Get(browser_context()); |
170 return true; | 170 return true; |
171 } | 171 } |
172 | 172 |
173 bool CastChannelAsyncApiFunction::Respond() { | 173 bool CastChannelAsyncApiFunction::Respond() { |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 std::string& signature = params_->signature; | 620 std::string& signature = params_->signature; |
621 if (signature.empty() || keys.empty() || | 621 if (signature.empty() || keys.empty() || |
622 !cast_channel::SetTrustedCertificateAuthorities(keys, signature)) { | 622 !cast_channel::SetTrustedCertificateAuthorities(keys, signature)) { |
623 SetError("Unable to set authority keys."); | 623 SetError("Unable to set authority keys."); |
624 } | 624 } |
625 | 625 |
626 AsyncWorkCompleted(); | 626 AsyncWorkCompleted(); |
627 } | 627 } |
628 | 628 |
629 } // namespace extensions | 629 } // namespace extensions |
OLD | NEW |