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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_api.cc

Issue 555283002: Create new class "CastTransport", which encapsulates the message read and write event loops. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback addressed. Created 6 years, 3 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_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 ee888cb2602536cfbea8f03a134ce05f7e9d6b43..96f778b1b14d52f716b9db4e5cc382d7ffdcd5a2 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_api.cc
@@ -132,8 +132,10 @@ CastChannelAPI::GetFactoryInstance() {
}
scoped_ptr<CastSocket> CastChannelAPI::CreateCastSocket(
- const std::string& extension_id, const net::IPEndPoint& ip_endpoint,
- ChannelAuthType channel_auth, const base::TimeDelta& timeout) {
+ const std::string& extension_id,
+ const net::IPEndPoint& ip_endpoint,
+ ChannelAuthType channel_auth,
+ const base::TimeDelta& timeout) {
Wez 2014/09/25 02:09:15 nit: These can be un-wrapped.
Kevin M 2014/09/25 17:53:04 Done.
if (socket_for_test_.get()) {
return socket_for_test_.Pass();
} else {
@@ -424,8 +426,8 @@ bool CastChannelSendFunction::Prepare() {
}
void CastChannelSendFunction::AsyncWorkStart() {
- CastSocket* socket = GetSocketOrCompleteWithError(
- params_->channel.channel_id);
+ CastSocket* socket =
+ GetSocketOrCompleteWithError(params_->channel.channel_id);
Wez 2014/09/25 02:09:15 nit: And these.
Kevin M 2014/09/25 17:53:04 Done.
if (socket)
socket->SendMessage(params_->message,
base::Bind(&CastChannelSendFunction::OnSend, this));
@@ -455,8 +457,8 @@ bool CastChannelCloseFunction::Prepare() {
}
void CastChannelCloseFunction::AsyncWorkStart() {
- CastSocket* socket = GetSocketOrCompleteWithError(
- params_->channel.channel_id);
+ CastSocket* socket =
+ GetSocketOrCompleteWithError(params_->channel.channel_id);
Wez 2014/09/25 02:09:15 nit: And this!
Kevin M 2014/09/25 17:53:04 Done.
if (socket)
socket->Close(base::Bind(&CastChannelCloseFunction::OnClose, this));
}

Powered by Google App Engine
This is Rietveld 408576698