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

Unified Diff: content/renderer/pepper/pepper_websocket_host.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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
« no previous file with comments | « content/renderer/pepper/pepper_video_capture_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_websocket_host.cc
diff --git a/content/renderer/pepper/pepper_websocket_host.cc b/content/renderer/pepper/pepper_websocket_host.cc
index d473e84d6dc1c598bb493af0b87524221ae0d7f6..e2ab15a4a63dfd0f0d50f83a5cf77271b14ded62 100644
--- a/content/renderer/pepper/pepper_websocket_host.cc
+++ b/content/renderer/pepper/pepper_websocket_host.cc
@@ -43,7 +43,7 @@ PepperWebSocketHost::PepperWebSocketHost(
}
PepperWebSocketHost::~PepperWebSocketHost() {
- if (websocket_.get())
+ if (websocket_)
websocket_->disconnect();
}
@@ -67,7 +67,7 @@ int32_t PepperWebSocketHost::OnResourceMessageReceived(
void PepperWebSocketHost::didConnect() {
std::string protocol;
- if (websocket_.get())
+ if (websocket_)
protocol = websocket_->subprotocol().utf8();
connecting_ = false;
connect_reply_.params.set_result(PP_OK);
@@ -169,7 +169,7 @@ void PepperWebSocketHost::didClose(unsigned long unhandled_buffered_amount,
}
// Disconnect.
- if (websocket_.get())
+ if (websocket_)
websocket_->disconnect();
}
@@ -233,7 +233,7 @@ int32_t PepperWebSocketHost::OnHostMsgConnect(
WebDocument document = container->element().document();
websocket_.reset(WebSocket::create(document, this));
DCHECK(websocket_.get());
- if (!websocket_.get())
+ if (!websocket_)
return PP_ERROR_NOTSUPPORTED;
// Set receiving binary object type.
@@ -249,7 +249,7 @@ int32_t PepperWebSocketHost::OnHostMsgClose(
ppapi::host::HostMessageContext* context,
int32_t code,
const std::string& reason) {
- if (!websocket_.get())
+ if (!websocket_)
return PP_ERROR_FAILED;
close_reply_ = context->MakeReplyMessageContext();
initiating_close_ = true;
@@ -261,7 +261,7 @@ int32_t PepperWebSocketHost::OnHostMsgClose(
int32_t PepperWebSocketHost::OnHostMsgSendText(
ppapi::host::HostMessageContext* context,
const std::string& message) {
- if (websocket_.get()) {
+ if (websocket_) {
WebString web_message = WebString::fromUTF8(message);
websocket_->sendText(web_message);
}
@@ -282,7 +282,7 @@ int32_t PepperWebSocketHost::OnHostMsgSendBinary(
int32_t PepperWebSocketHost::OnHostMsgFail(
ppapi::host::HostMessageContext* context,
const std::string& message) {
- if (websocket_.get())
+ if (websocket_)
websocket_->fail(WebString::fromUTF8(message));
return PP_OK;
}
« no previous file with comments | « content/renderer/pepper/pepper_video_capture_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698