| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/devtools/devtools_agent_host_impl.h" | 5 #include "content/browser/devtools/devtools_agent_host_impl.h" | 
| 6 | 6 | 
| 7 #include <map> | 7 #include <map> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 404   if (chunk.is_last) { | 404   if (chunk.is_last) { | 
| 405     if (message_buffer_.size() != message_buffer_size_) | 405     if (message_buffer_.size() != message_buffer_size_) | 
| 406       return false; | 406       return false; | 
| 407     callback_.Run(chunk.session_id, message_buffer_); | 407     callback_.Run(chunk.session_id, message_buffer_); | 
| 408     message_buffer_ = std::string(); | 408     message_buffer_ = std::string(); | 
| 409     message_buffer_size_ = 0; | 409     message_buffer_size_ = 0; | 
| 410   } | 410   } | 
| 411   return true; | 411   return true; | 
| 412 } | 412 } | 
| 413 | 413 | 
|  | 414 void DevToolsMessageChunkProcessor::Reset() { | 
|  | 415   message_buffer_ = std::string(); | 
|  | 416   message_buffer_size_ = 0; | 
|  | 417   state_cookie_ = std::string(); | 
|  | 418   last_call_id_ = 0; | 
|  | 419 } | 
|  | 420 | 
| 414 }  // namespace content | 421 }  // namespace content | 
| OLD | NEW | 
|---|