Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: extensions/browser/api/cast_channel/cast_socket.h

Issue 2709523008: [Cast Channel] Add support for nonce challenge to Cast channel authentication. (Closed)
Patch Set: Addresses comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_socket.h
diff --git a/extensions/browser/api/cast_channel/cast_socket.h b/extensions/browser/api/cast_channel/cast_socket.h
index 2fa1821d7ca054fa369b02f37c06ae6c7036707f..9590e6853af2dca1f3ceca6d12949d4ede7316be 100644
--- a/extensions/browser/api/cast_channel/cast_socket.h
+++ b/extensions/browser/api/cast_channel/cast_socket.h
@@ -218,6 +218,8 @@ class CastSocketImpl : public CastSocket {
friend class CastSocketTest;
friend class TestCastSocket;
+ static void EnsureNonceTimely();
+
void SetErrorState(ChannelError error_state) override;
// Frees resources and cancels pending callbacks. |ready_state_| will be set
@@ -283,6 +285,11 @@ class CastSocketImpl : public CastSocket {
void SetConnectState(proto::ConnectionState connect_state);
void SetReadyState(ReadyState ready_state);
+ // The nonce challenge to send to the Cast receiver.
+ // The nonce is updated daily.
+ static std::string nonce_;
+ static base::Time nonce_generation_time_;
+
base::ThreadChecker thread_checker_;
const std::string owner_extension_id_;

Powered by Google App Engine
This is Rietveld 408576698