diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 19:18:03 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 19:18:03 +0000 |
commit | 137ad0c8acd634e11925bce6a605e51a989ac0ff (patch) | |
tree | 608d5c5c7a409e77416a5d2a0f14ee83aca194d9 /chrome/browser/renderer_host | |
parent | b0ba335675ec7a44de94f182720f16c7ee0c2a7f (diff) | |
download | chromium_src-137ad0c8acd634e11925bce6a605e51a989ac0ff.zip chromium_src-137ad0c8acd634e11925bce6a605e51a989ac0ff.tar.gz chromium_src-137ad0c8acd634e11925bce6a605e51a989ac0ff.tar.bz2 |
Reverting 12470.
caused purify errors
Review URL: http://codereview.chromium.org/45055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 19 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.h | 17 |
2 files changed, 7 insertions, 29 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 25286f5..e8e8d3b 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -53,7 +53,7 @@ #endif // Uncomment to enable logging of request traffic. -// #define LOG_RESOURCE_DISPATCHER_REQUESTS +//#define LOG_RESOURCE_DISPATCHER_REQUESTS #ifdef LOG_RESOURCE_DISPATCHER_REQUESTS # define RESOURCE_LOG(stuff) LOG(INFO) << stuff @@ -328,18 +328,6 @@ void ResourceDispatcherHost::BeginRequest( request->set_context(context); request->set_origin_pid(request_data.origin_pid); - // If the request is for the top level page or a frame/iframe, then we should - // prioritize it higher than other resource types. Currently, we just use - // priorities 1 and 0. - // TODO(willchan): Revisit the actual priorities when looking at considering - // boosting priorities for requests for the foreground tab. - if (request_data.resource_type == ResourceType::MAIN_FRAME || - request_data.resource_type == ResourceType::SUB_FRAME) { - request->set_priority(1); - } else { - request->set_priority(0); - } - // Set upload data. uint64 upload_size = 0; if (!request_data.upload_content.empty()) { @@ -389,8 +377,7 @@ void ResourceDispatcherHost::BeginRequest( request_data.main_frame_origin, request_data.resource_type, upload_size); - extra_info->allow_download = - ResourceType::IsFrame(request_data.resource_type); + extra_info->allow_download = ResourceType::IsFrame(request_data.resource_type); request->set_user_data(extra_info); // takes pointer ownership BeginRequestInternal(request); @@ -524,7 +511,7 @@ void ResourceDispatcherHost::BeginDownload(const GURL& url, "null", // frame_origin "null", // main_frame_origin ResourceType::SUB_RESOURCE, - 0 /* upload_size */); + 0 /* upload_size */ ); extra_info->allow_download = true; extra_info->is_download = true; request->set_user_data(extra_info); // Takes pointer ownership. diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h index 052c157..2ec711b 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host.h @@ -13,11 +13,7 @@ #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" @@ -63,14 +59,13 @@ class ResourceDispatcherHost : public URLRequest::Delegate { const ViewHostMsg_Resource_Request& request_data) = 0; protected: - explicit Receiver(ChildProcessInfo::ProcessType type) - : ChildProcessInfo(type) { } + 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, @@ -178,7 +173,6 @@ class ResourceDispatcherHost : public URLRequest::Delegate { class Observer { public: - virtual ~Observer() { } virtual void OnRequestStarted(ResourceDispatcherHost* resource_dispatcher, URLRequest* request) = 0; virtual void OnResponseCompleted( @@ -364,10 +358,7 @@ 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); @@ -433,7 +424,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 |