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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 scoped_ptr<CastSocket> CastChannelAPI::GetSocketForTest() { | 142 scoped_ptr<CastSocket> CastChannelAPI::GetSocketForTest() { |
143 return socket_for_test_.Pass(); | 143 return socket_for_test_.Pass(); |
144 } | 144 } |
145 | 145 |
146 content::BrowserContext* CastChannelAPI::GetBrowserContext() const { | 146 content::BrowserContext* CastChannelAPI::GetBrowserContext() const { |
147 return browser_context_; | 147 return browser_context_; |
148 } | 148 } |
149 | 149 |
150 CastChannelAPI::~CastChannelAPI() {} | 150 CastChannelAPI::~CastChannelAPI() {} |
151 | 151 |
152 CastChannelAsyncApiFunction::CastChannelAsyncApiFunction() : manager_(NULL) { | 152 CastChannelAsyncApiFunction::CastChannelAsyncApiFunction() : manager_(nullptr) { |
153 } | 153 } |
154 | 154 |
155 CastChannelAsyncApiFunction::~CastChannelAsyncApiFunction() { } | 155 CastChannelAsyncApiFunction::~CastChannelAsyncApiFunction() { } |
156 | 156 |
157 bool CastChannelAsyncApiFunction::PrePrepare() { | 157 bool CastChannelAsyncApiFunction::PrePrepare() { |
158 manager_ = ApiResourceManager<CastSocket>::Get(browser_context()); | 158 manager_ = ApiResourceManager<CastSocket>::Get(browser_context()); |
159 return true; | 159 return true; |
160 } | 160 } |
161 | 161 |
162 bool CastChannelAsyncApiFunction::Respond() { | 162 bool CastChannelAsyncApiFunction::Respond() { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 std::string& signature = params_->signature; | 562 std::string& signature = params_->signature; |
563 if (signature.empty() || keys.empty() || | 563 if (signature.empty() || keys.empty() || |
564 !cast_channel::SetTrustedCertificateAuthorities(keys, signature)) { | 564 !cast_channel::SetTrustedCertificateAuthorities(keys, signature)) { |
565 SetError("Unable to set authority keys."); | 565 SetError("Unable to set authority keys."); |
566 } | 566 } |
567 | 567 |
568 AsyncWorkCompleted(); | 568 AsyncWorkCompleted(); |
569 } | 569 } |
570 | 570 |
571 } // namespace extensions | 571 } // namespace extensions |
OLD | NEW |