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

Side by Side Diff: content/browser/renderer_host/sync_resource_handler.h

Issue 10644011: Revert r143458 (which re-applies r143341 and r142979). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/browser/renderer_host/resource_handler.h" 11 #include "content/browser/renderer_host/resource_handler.h"
12 #include "content/public/common/resource_response.h" 12 #include "content/public/common/resource_response.h"
13 13
14 namespace IPC { 14 namespace IPC {
15 class Message; 15 class Message;
16 } 16 }
17 17
18 namespace net { 18 namespace net {
19 class IOBuffer; 19 class IOBuffer;
20 class URLRequest;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 class ResourceDispatcherHostImpl; 24 class ResourceDispatcherHostImpl;
24 class ResourceMessageFilter; 25 class ResourceMessageFilter;
25 26
26 // Used to complete a synchronous resource request in response to resource load 27 // Used to complete a synchronous resource request in response to resource load
27 // events from the resource dispatcher host. 28 // events from the resource dispatcher host.
28 class SyncResourceHandler : public ResourceHandler { 29 class SyncResourceHandler : public ResourceHandler {
29 public: 30 public:
30 SyncResourceHandler(ResourceMessageFilter* filter, 31 SyncResourceHandler(ResourceMessageFilter* filter,
31 const GURL& url, 32 net::URLRequest* request,
32 IPC::Message* result_message, 33 IPC::Message* result_message,
33 ResourceDispatcherHostImpl* resource_dispatcher_host); 34 ResourceDispatcherHostImpl* resource_dispatcher_host);
34 virtual ~SyncResourceHandler(); 35 virtual ~SyncResourceHandler();
35 36
36 virtual bool OnUploadProgress(int request_id, 37 virtual bool OnUploadProgress(int request_id,
37 uint64 position, 38 uint64 position,
38 uint64 size) OVERRIDE; 39 uint64 size) OVERRIDE;
39 virtual bool OnRequestRedirected(int request_id, 40 virtual bool OnRequestRedirected(int request_id,
40 const GURL& new_url, 41 const GURL& new_url,
41 ResourceResponse* response, 42 ResourceResponse* response,
(...skipping 15 matching lines...) Expand all
57 const net::URLRequestStatus& status, 58 const net::URLRequestStatus& status,
58 const std::string& security_info) OVERRIDE; 59 const std::string& security_info) OVERRIDE;
59 60
60 private: 61 private:
61 enum { kReadBufSize = 3840 }; 62 enum { kReadBufSize = 3840 };
62 63
63 scoped_refptr<net::IOBuffer> read_buffer_; 64 scoped_refptr<net::IOBuffer> read_buffer_;
64 65
65 SyncLoadResult result_; 66 SyncLoadResult result_;
66 scoped_refptr<ResourceMessageFilter> filter_; 67 scoped_refptr<ResourceMessageFilter> filter_;
68 net::URLRequest* request_;
67 IPC::Message* result_message_; 69 IPC::Message* result_message_;
68 ResourceDispatcherHostImpl* rdh_; 70 ResourceDispatcherHostImpl* rdh_;
69 }; 71 };
70 72
71 } // namespace content 73 } // namespace content
72 74
73 #endif // CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_ 75 #endif // CONTENT_BROWSER_RENDERER_HOST_SYNC_RESOURCE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698