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

Unified Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 5998006: Clean up Automation and Chrome Frame IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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: chrome/browser/automation/url_request_automation_job.cc
===================================================================
--- chrome/browser/automation/url_request_automation_job.cc (revision 69966)
+++ chrome/browser/automation/url_request_automation_job.cc (working copy)
@@ -148,7 +148,7 @@
void URLRequestAutomationJob::Kill() {
if (message_filter_.get()) {
if (!is_pending()) {
- message_filter_->Send(new AutomationMsg_RequestEnd(0, tab_, id_,
+ message_filter_->Send(new AutomationMsg_RequestEnd(tab_, id_,
URLRequestStatus(URLRequestStatus::CANCELED, net::ERR_ABORTED)));
}
}
@@ -168,8 +168,7 @@
pending_buf_size_ = buf_size;
if (message_filter_) {
- message_filter_->Send(new AutomationMsg_RequestRead(0, tab_, id_,
- buf_size));
+ message_filter_->Send(new AutomationMsg_RequestRead(tab_, id_, buf_size));
SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
} else {
MessageLoop::current()->PostTask(
@@ -241,11 +240,8 @@
case AutomationMsg_RequestData::ID:
case AutomationMsg_RequestEnd::ID: {
void* iter = NULL;
- int tab = 0;
- if (message.ReadInt(&iter, &tab) &&
- message.ReadInt(&iter, request_id)) {
+ if (message.ReadInt(&iter, request_id))
return true;
- }
break;
}
}
@@ -268,8 +264,8 @@
IPC_END_MESSAGE_MAP()
}
-void URLRequestAutomationJob::OnRequestStarted(int tab, int id,
- const IPC::AutomationURLResponse& response) {
+void URLRequestAutomationJob::OnRequestStarted(
+ int id, const AutomationURLResponse& response) {
DVLOG(1) << "URLRequestAutomationJob: " << request_->url().spec()
<< " - response started.";
set_expected_content_size(response.content_length);
@@ -289,7 +285,7 @@
}
void URLRequestAutomationJob::OnDataAvailable(
- int tab, int id, const std::string& bytes) {
+ int id, const std::string& bytes) {
DVLOG(1) << "URLRequestAutomationJob: " << request_->url().spec()
<< " - data available, Size: " << bytes.size();
DCHECK(!bytes.empty());
@@ -313,7 +309,7 @@
}
void URLRequestAutomationJob::OnRequestEnd(
- int tab, int id, const URLRequestStatus& status) {
+ int id, const URLRequestStatus& status) {
#ifndef NDEBUG
std::string url;
if (request_)
@@ -436,7 +432,7 @@
}
// Ask automation to start this request.
- IPC::AutomationURLRequest automation_request(
+ AutomationURLRequest automation_request(
request_->url().spec(),
request_->method(),
referrer.spec(),
@@ -446,8 +442,8 @@
request_->load_flags());
DCHECK(message_filter_);
- message_filter_->Send(new AutomationMsg_RequestStart(0, tab_, id_,
- automation_request));
+ message_filter_->Send(new AutomationMsg_RequestStart(
+ tab_, id_, automation_request));
}
void URLRequestAutomationJob::DisconnectFromMessageFilter() {
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.h ('k') | chrome/browser/extensions/extension_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698