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

Side by Side Diff: content/browser/loader/resource_scheduler.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 <set> 5 #include <set>
6 6
7 #include "content/browser/loader/resource_scheduler.h" 7 #include "content/browser/loader/resource_scheduler.h"
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/common/resource_messages.h" 10 #include "content/common/resource_messages.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 bool accounted_as_delayable_request() const { 161 bool accounted_as_delayable_request() const {
162 return accounted_as_delayable_request_; 162 return accounted_as_delayable_request_;
163 } 163 }
164 void set_accounted_as_delayable_request(bool accounted) { 164 void set_accounted_as_delayable_request(bool accounted) {
165 accounted_as_delayable_request_ = accounted; 165 accounted_as_delayable_request_ = accounted;
166 } 166 }
167 167
168 private: 168 private:
169 // ResourceMessageDelegate interface: 169 // ResourceMessageDelegate interface:
170 virtual bool OnMessageReceived(const IPC::Message& message, 170 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
171 bool* message_was_ok) OVERRIDE {
172 bool handled = true; 171 bool handled = true;
173 IPC_BEGIN_MESSAGE_MAP_EX(ScheduledResourceRequest, message, *message_was_ok) 172 IPC_BEGIN_MESSAGE_MAP(ScheduledResourceRequest, message)
174 IPC_MESSAGE_HANDLER(ResourceHostMsg_DidChangePriority, DidChangePriority) 173 IPC_MESSAGE_HANDLER(ResourceHostMsg_DidChangePriority, DidChangePriority)
175 IPC_MESSAGE_UNHANDLED(handled = false) 174 IPC_MESSAGE_UNHANDLED(handled = false)
176 IPC_END_MESSAGE_MAP_EX() 175 IPC_END_MESSAGE_MAP()
177 return handled; 176 return handled;
178 } 177 }
179 178
180 // ResourceThrottle interface: 179 // ResourceThrottle interface:
181 virtual void WillStartRequest(bool* defer) OVERRIDE { 180 virtual void WillStartRequest(bool* defer) OVERRIDE {
182 deferred_ = *defer = !ready_; 181 deferred_ = *defer = !ready_;
183 } 182 }
184 183
185 virtual const char* GetNameForLogging() const OVERRIDE { 184 virtual const char* GetNameForLogging() const OVERRIDE {
186 return "ResourceScheduler"; 185 return "ResourceScheduler";
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 client->ReprioritizeRequest( 648 client->ReprioritizeRequest(
650 request, old_priority_params, new_priority_params); 649 request, old_priority_params, new_priority_params);
651 } 650 }
652 651
653 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( 652 ResourceScheduler::ClientId ResourceScheduler::MakeClientId(
654 int child_id, int route_id) { 653 int child_id, int route_id) {
655 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; 654 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id;
656 } 655 }
657 656
658 } // namespace content 657 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_message_filter.cc ('k') | content/browser/loader/resource_scheduler_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698