summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/resource_dispatcher_host.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 18:14:29 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 18:14:29 +0000
commit72f2a144addea5e57bebdc8ede9665569f588c6f (patch)
treef35d0fdf4521ddb875880b089816155a2f9b91f0 /chrome/browser/renderer_host/resource_dispatcher_host.h
parent52b0f0ca254e56b1cdd2d40eeb47e18b3e800a8e (diff)
downloadchromium_src-72f2a144addea5e57bebdc8ede9665569f588c6f.zip
chromium_src-72f2a144addea5e57bebdc8ede9665569f588c6f.tar.gz
chromium_src-72f2a144addea5e57bebdc8ede9665569f588c6f.tar.bz2
Prioritize which HTTP requests get a socket first by adding a priority level to various methods and classes. Fix lint errors along the way.
R=darin,wtc BUG=8993 Review URL: http://codereview.chromium.org/42541 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/resource_dispatcher_host.h')
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 2ec711b..052c157 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -13,7 +13,11 @@
#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
#include <map>
+#include <string>
+#include <vector>
+#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/observer_list.h"
#include "base/process.h"
#include "base/timer.h"
@@ -59,13 +63,14 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
const ViewHostMsg_Resource_Request& request_data) = 0;
protected:
- Receiver(ChildProcessInfo::ProcessType type) : ChildProcessInfo(type) { }
+ explicit Receiver(ChildProcessInfo::ProcessType type)
+ : ChildProcessInfo(type) { }
virtual ~Receiver() { }
};
// Holds the data we would like to associate with each request
class ExtraRequestInfo : public URLRequest::UserData {
- friend class ResourceDispatcherHost;
+ friend class ResourceDispatcherHost;
public:
ExtraRequestInfo(ResourceHandler* handler,
ChildProcessInfo::ProcessType process_type,
@@ -173,6 +178,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
class Observer {
public:
+ virtual ~Observer() { }
virtual void OnRequestStarted(ResourceDispatcherHost* resource_dispatcher,
URLRequest* request) = 0;
virtual void OnResponseCompleted(
@@ -358,7 +364,10 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
void DataReceivedACK(int process_id, int request_id);
// Needed for the sync IPC message dispatcher macros.
- bool Send(IPC::Message* message) { delete message; return false; }
+ bool Send(IPC::Message* message) {
+ delete message;
+ return false;
+ }
private:
FRIEND_TEST(ResourceDispatcherHostTest, TestBlockedRequestsProcessDies);
@@ -424,7 +433,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
// It may be enhanced in the future to provide some kind of prioritization
// mechanism. We should also consider a hashtable or binary tree if it turns
// out we have a lot of things here.
- typedef std::map<GlobalRequestID,URLRequest*> PendingRequestList;
+ typedef std::map<GlobalRequestID, URLRequest*> PendingRequestList;
// Deletes the pending request identified by the iterator passed in.
// This function will invalidate the iterator passed in. Callers should