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

Side by Side Diff: content/browser/loader/async_resource_handler.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/loader/async_resource_handler.h" 5 #include "content/browser/loader/async_resource_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 sent_first_data_msg_(false), 90 sent_first_data_msg_(false),
91 reported_transfer_size_(0) { 91 reported_transfer_size_(0) {
92 InitializeResourceBufferConstants(); 92 InitializeResourceBufferConstants();
93 } 93 }
94 94
95 AsyncResourceHandler::~AsyncResourceHandler() { 95 AsyncResourceHandler::~AsyncResourceHandler() {
96 if (has_checked_for_sufficient_resources_) 96 if (has_checked_for_sufficient_resources_)
97 rdh_->FinishedWithResourcesForRequest(request()); 97 rdh_->FinishedWithResourcesForRequest(request());
98 } 98 }
99 99
100 bool AsyncResourceHandler::OnMessageReceived(const IPC::Message& message, 100 bool AsyncResourceHandler::OnMessageReceived(const IPC::Message& message) {
101 bool* message_was_ok) {
102 bool handled = true; 101 bool handled = true;
103 IPC_BEGIN_MESSAGE_MAP_EX(AsyncResourceHandler, message, *message_was_ok) 102 IPC_BEGIN_MESSAGE_MAP(AsyncResourceHandler, message)
104 IPC_MESSAGE_HANDLER(ResourceHostMsg_FollowRedirect, OnFollowRedirect) 103 IPC_MESSAGE_HANDLER(ResourceHostMsg_FollowRedirect, OnFollowRedirect)
105 IPC_MESSAGE_HANDLER(ResourceHostMsg_DataReceived_ACK, OnDataReceivedACK) 104 IPC_MESSAGE_HANDLER(ResourceHostMsg_DataReceived_ACK, OnDataReceivedACK)
106 IPC_MESSAGE_UNHANDLED(handled = false) 105 IPC_MESSAGE_UNHANDLED(handled = false)
107 IPC_END_MESSAGE_MAP_EX() 106 IPC_END_MESSAGE_MAP()
108 return handled; 107 return handled;
109 } 108 }
110 109
111 void AsyncResourceHandler::OnFollowRedirect(int request_id) { 110 void AsyncResourceHandler::OnFollowRedirect(int request_id) {
112 if (!request()->status().is_success()) { 111 if (!request()->status().is_success()) {
113 DVLOG(1) << "OnFollowRedirect for invalid request"; 112 DVLOG(1) << "OnFollowRedirect for invalid request";
114 return; 113 return;
115 } 114 }
116 115
117 ResumeIfDeferred(); 116 ResumeIfDeferred();
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 request()->LogUnblocked(); 402 request()->LogUnblocked();
404 controller()->Resume(); 403 controller()->Resume();
405 } 404 }
406 } 405 }
407 406
408 void AsyncResourceHandler::OnDefer() { 407 void AsyncResourceHandler::OnDefer() {
409 request()->LogBlockedBy("AsyncResourceHandler"); 408 request()->LogBlockedBy("AsyncResourceHandler");
410 } 409 }
411 410
412 } // namespace content 411 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698