| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/automation/url_request_automation_job.h" | 5 #include "chrome/browser/automation/url_request_automation_job.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/browser/automation/automation_resource_message_filter.h" | 10 #include "chrome/browser/automation/automation_resource_message_filter.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 void URLRequestAutomationJob::Cleanup() { | 372 void URLRequestAutomationJob::Cleanup() { |
| 373 headers_ = NULL; | 373 headers_ = NULL; |
| 374 mime_type_.erase(); | 374 mime_type_.erase(); |
| 375 | 375 |
| 376 id_ = 0; | 376 id_ = 0; |
| 377 tab_ = 0; | 377 tab_ = 0; |
| 378 | 378 |
| 379 DCHECK(message_filter_ == NULL); | 379 DCHECK(!message_filter_); |
| 380 DisconnectFromMessageFilter(); | 380 DisconnectFromMessageFilter(); |
| 381 | 381 |
| 382 pending_buf_ = NULL; | 382 pending_buf_ = NULL; |
| 383 pending_buf_size_ = 0; | 383 pending_buf_size_ = 0; |
| 384 } | 384 } |
| 385 | 385 |
| 386 void URLRequestAutomationJob::StartAsync() { | 386 void URLRequestAutomationJob::StartAsync() { |
| 387 DVLOG(1) << "URLRequestAutomationJob: start request: " | 387 DVLOG(1) << "URLRequestAutomationJob: start request: " |
| 388 << (request_ ? request_->url().spec() : "NULL request"); | 388 << (request_ ? request_->url().spec() : "NULL request"); |
| 389 | 389 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 if (!is_done()) { | 482 if (!is_done()) { |
| 483 NotifyDone(request_status_); | 483 NotifyDone(request_status_); |
| 484 } | 484 } |
| 485 // Reset any pending reads. | 485 // Reset any pending reads. |
| 486 if (pending_buf_) { | 486 if (pending_buf_) { |
| 487 pending_buf_ = NULL; | 487 pending_buf_ = NULL; |
| 488 pending_buf_size_ = 0; | 488 pending_buf_size_ = 0; |
| 489 NotifyReadComplete(0); | 489 NotifyReadComplete(0); |
| 490 } | 490 } |
| 491 } | 491 } |
| OLD | NEW |