Index: extensions/browser/api/cast_channel/cast_channel_api.cc |
diff --git a/extensions/browser/api/cast_channel/cast_channel_api.cc b/extensions/browser/api/cast_channel/cast_channel_api.cc |
index 9d711a48c0c7910804a435ce46cd76f4fa3ae8c6..8c09e231bb7c2834441c231970fadf414e6fbafa 100644 |
--- a/extensions/browser/api/cast_channel/cast_channel_api.cc |
+++ b/extensions/browser/api/cast_channel/cast_channel_api.cc |
@@ -14,6 +14,7 @@ |
#include "base/time/default_tick_clock.h" |
#include "base/values.h" |
#include "content/public/browser/browser_thread.h" |
+#include "extensions/browser/api/cast_channel/cast_auth_util.h" |
#include "extensions/browser/api/cast_channel/cast_socket.h" |
#include "extensions/browser/api/cast_channel/logger.h" |
#include "extensions/browser/event_router.h" |
@@ -510,4 +511,28 @@ void CastChannelGetLogsFunction::AsyncWorkStart() { |
AsyncWorkCompleted(); |
} |
+CastChannelSetAuthorityKeysFunction::CastChannelSetAuthorityKeysFunction() { |
+} |
+ |
+CastChannelSetAuthorityKeysFunction::~CastChannelSetAuthorityKeysFunction() { |
+} |
+ |
+bool CastChannelSetAuthorityKeysFunction::Prepare() { |
+ params_ = cast_channel::SetAuthorityKeys::Params::Create(*args_); |
+ EXTENSION_FUNCTION_VALIDATE(params_.get()); |
+ return true; |
+} |
+ |
+void CastChannelSetAuthorityKeysFunction::AsyncWorkStart() { |
+ std::string& signature = params_->signature; |
+ std::string& keys = params_->keys; |
+ if (cast_channel::SetTrustedCertificateAuthorities(signature, keys)) { |
+ SetResult(new base::StringValue("")); // Intentionally returns a blank. |
Ryan Sleevi
2014/10/09 21:02:43
std::string(), not ""
|
+ } else { |
+ SetError("Unable to set authority keys."); |
+ } |
+ |
+ AsyncWorkCompleted(); |
+} |
+ |
} // namespace extensions |