| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/net/browser_connection_handler.h" | 5 #include "blimp/net/browser_connection_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "blimp/net/blimp_connection.h" | 9 #include "blimp/net/blimp_connection.h" |
| 10 #include "blimp/net/blimp_message_checkpointer.h" | 10 #include "blimp/net/blimp_message_checkpointer.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 output_buffer_->SetOutputProcessor( | 56 output_buffer_->SetOutputProcessor( |
| 57 connection_->GetOutgoingMessageProcessor()); | 57 connection_->GetOutgoingMessageProcessor()); |
| 58 connection_->AddConnectionErrorObserver(this); | 58 connection_->AddConnectionErrorObserver(this); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void BrowserConnectionHandler::OnConnectionError(int error) { | 61 void BrowserConnectionHandler::OnConnectionError(int error) { |
| 62 DropCurrentConnection(); | 62 DropCurrentConnection(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void BrowserConnectionHandler::DropCurrentConnection() { | 65 void BrowserConnectionHandler::DropCurrentConnection() { |
| 66 DCHECK(connection_); | 66 if (!connection_) { |
| 67 return; |
| 68 } |
| 69 |
| 67 output_buffer_->SetOutputProcessor(nullptr); | 70 output_buffer_->SetOutputProcessor(nullptr); |
| 68 connection_.reset(); | 71 connection_.reset(); |
| 69 } | 72 } |
| 70 | 73 |
| 71 } // namespace blimp | 74 } // namespace blimp |
| OLD | NEW |