summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 15:38:46 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 15:38:46 +0000
commitbd328ad5f82d9d7d3bbd45d98c5e38e13044b82b (patch)
treec2df040de05b1433002c9c21a8de600de10704b8 /chrome/common
parent15e18c0f131d39d2e3817aa3f830c7acb1ad9eba (diff)
downloadchromium_src-bd328ad5f82d9d7d3bbd45d98c5e38e13044b82b.zip
chromium_src-bd328ad5f82d9d7d3bbd45d98c5e38e13044b82b.tar.gz
chromium_src-bd328ad5f82d9d7d3bbd45d98c5e38e13044b82b.tar.bz2
Revert change 10975 and 10972 because it broke the purify
tests, and it might have caused a unit tests failure. purify error : UMR in URLRequest::response_data_file failing test: URLFetcherHeadersTest.Headers: c:\b\slave\chromium-rel-builder\build\src\chrome\browser\net\url_fetcher_unittest.cc(222): error: Value of: source->response_headers()->GetNormalizedHeader("cache-control", &header) Actual: false Expected: true c:\b\slave\chromium-rel-builder\build\src\chrome\browser\net\url_fetcher_unittest.cc(223): error: Value of: header Actual: "" Expected: "private" c:\b\slave\chromium-rel-builder\build\src\chrome\browser\net\url_fetcher_unittest.cc(181): error: Value of: response_code Actual: 404 Expected: 200 Release only. Review URL: http://codereview.chromium.org/39191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/render_messages.h7
-rw-r--r--chrome/common/render_messages_internal.h18
-rw-r--r--chrome/common/resource_dispatcher.cc25
-rw-r--r--chrome/common/resource_dispatcher.h1
4 files changed, 4 insertions, 47 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 6258f37..582bf3a 100755
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -377,9 +377,6 @@ struct ParamTraits<ResourceType::Type> {
case ResourceType::OBJECT:
type = L"OBJECT";
break;
- case ResourceType::MEDIA:
- type = L"MEDIA";
- break;
default:
type = L"UNKNOWN";
break;
@@ -1337,14 +1334,12 @@ struct ParamTraits<ResourceResponseHead> {
ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Write(m, p);
WriteParam(m, p.status);
WriteParam(m, p.filter_policy);
- WriteParam(m, p.response_data_file);
}
static bool Read(const Message* m, void** iter, param_type* r) {
return
ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Read(m, iter, r) &&
ReadParam(m, iter, &r->status) &&
- ReadParam(m, iter, &r->filter_policy) &&
- ReadParam(m, iter, &r->response_data_file);
+ ReadParam(m, iter, &r->filter_policy);
}
static void Log(const param_type& p, std::wstring* l) {
// log more?
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 009e975..963afae 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -175,14 +175,7 @@ IPC_BEGIN_MESSAGES(View)
int /* request_id */,
ResourceResponseHead)
- // Sent as download progress is being made, size of the resource may be
- // unknown, in that case |size| is -1.
- IPC_MESSAGE_ROUTED3(ViewMsg_Resource_DownloadProgress,
- int /* request_id */,
- int64 /* position */,
- int64 /* size */)
-
- // Sent as upload progress is being made.
+ // Sent as upload progress is being made
IPC_MESSAGE_ROUTED3(ViewMsg_Resource_UploadProgress,
int /* request_id */,
int64 /* position */,
@@ -1111,13 +1104,8 @@ IPC_BEGIN_MESSAGES(ViewHost)
GURL /* last url */,
GURL /* url redirected to */)
- // Sent by the renderer process to acknowledge receipt of a
- // DownloadProgress message.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_DownloadProgress_ACK,
- int /* request_id */)
-
- // Sent by the renderer process to acknowledge receipt of a
- // UploadProgress message.
+ // Sent when the renderer process to acknowlege receipt of and UploadProgress
+ // message.
IPC_MESSAGE_ROUTED1(ViewHostMsg_UploadProgress_ACK,
int /* request_id */)
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index cd78b0e..e9db613 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -278,29 +278,6 @@ bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
return true;
}
-void ResourceDispatcher::OnDownloadProgress(
- int request_id, int64 position, int64 size) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end()) {
- DLOG(WARNING) << "Got download progress for a nonexistant or "
- " finished requests";
- return;
- }
-
- PendingRequestInfo& request_info = it->second;
-
- RESOURCE_LOG("Dispatching download progress for " <<
- request_info.peer->GetURLForDebugging());
- request_info.peer->OnDownloadProgress(position, size);
-
- // Send the ACK message back.
- IPC::Message::Sender* sender = message_sender();
- if (sender) {
- sender->Send(
- new ViewHostMsg_DownloadProgress_ACK(MSG_ROUTING_NONE, request_id));
- }
-}
-
void ResourceDispatcher::OnUploadProgress(
int request_id, int64 position, int64 size) {
PendingRequestList::iterator it = pending_requests_.find(request_id);
@@ -481,7 +458,6 @@ void ResourceDispatcher::SetDefersLoading(int request_id, bool value) {
void ResourceDispatcher::DispatchMessage(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(ResourceDispatcher, message)
IPC_MESSAGE_HANDLER(ViewMsg_Resource_UploadProgress, OnUploadProgress)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_DownloadProgress, OnDownloadProgress)
IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedResponse, OnReceivedResponse)
IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedRedirect, OnReceivedRedirect)
IPC_MESSAGE_HANDLER(ViewMsg_Resource_DataReceived, OnReceivedData)
@@ -529,7 +505,6 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
bool ResourceDispatcher::IsResourceMessage(const IPC::Message& message) const {
switch (message.type()) {
- case ViewMsg_Resource_DownloadProgress::ID:
case ViewMsg_Resource_UploadProgress::ID:
case ViewMsg_Resource_ReceivedResponse::ID:
case ViewMsg_Resource_ReceivedRedirect::ID:
diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h
index a4708ee..a6b73d5 100644
--- a/chrome/common/resource_dispatcher.h
+++ b/chrome/common/resource_dispatcher.h
@@ -103,7 +103,6 @@ class ResourceDispatcher : public base::RefCounted<ResourceDispatcher> {
typedef base::hash_map<int, PendingRequestInfo> PendingRequestList;
// Message response handlers, called by the message handler for this process.
- void OnDownloadProgress(int request_id, int64 position, int64 size);
void OnUploadProgress(int request_id, int64 position, int64 size);
void OnReceivedResponse(int request_id, const ResourceResponseHead&);
void OnReceivedRedirect(int request_id, const GURL& new_url);