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

Side by Side Diff: chrome/browser/renderer_host/async_resource_handler.h

Issue 7276: Adding security info to canceled requests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
7 7
8 #include <string>
9
8 #include "base/process.h" 10 #include "base/process.h"
9 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 11 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
10 #include "chrome/browser/renderer_host/resource_handler.h" 12 #include "chrome/browser/renderer_host/resource_handler.h"
11 13
12 class SharedIOBuffer; 14 class SharedIOBuffer;
13 15
14 // Used to complete an asynchronous resource request in response to resource 16 // Used to complete an asynchronous resource request in response to resource
15 // load events from the resource dispatcher host. 17 // load events from the resource dispatcher host.
16 class AsyncResourceHandler : public ResourceHandler { 18 class AsyncResourceHandler : public ResourceHandler {
17 public: 19 public:
18 AsyncResourceHandler(ResourceDispatcherHost::Receiver* receiver, 20 AsyncResourceHandler(ResourceDispatcherHost::Receiver* receiver,
19 int render_process_host_id, 21 int render_process_host_id,
20 int routing_id, 22 int routing_id,
21 base::ProcessHandle render_process, 23 base::ProcessHandle render_process,
22 const GURL& url, 24 const GURL& url,
23 ResourceDispatcherHost* resource_dispatcher_host); 25 ResourceDispatcherHost* resource_dispatcher_host);
24 26
25 // ResourceHandler implementation: 27 // ResourceHandler implementation:
26 bool OnUploadProgress(int request_id, uint64 position, uint64 size); 28 bool OnUploadProgress(int request_id, uint64 position, uint64 size);
27 bool OnRequestRedirected(int request_id, const GURL& new_url); 29 bool OnRequestRedirected(int request_id, const GURL& new_url);
28 bool OnResponseStarted(int request_id, ResourceResponse* response); 30 bool OnResponseStarted(int request_id, ResourceResponse* response);
29 bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, 31 bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
30 int min_size); 32 int min_size);
31 bool OnReadCompleted(int request_id, int* bytes_read); 33 bool OnReadCompleted(int request_id, int* bytes_read);
32 bool OnResponseCompleted(int request_id, const URLRequestStatus& status); 34 bool OnResponseCompleted(int request_id,
35 const URLRequestStatus& status,
36 const std::string& security_info);
33 37
34 static void GlobalCleanup(); 38 static void GlobalCleanup();
35 39
36 private: 40 private:
37 // When reading, we don't know if we are going to get EOF (0 bytes read), so 41 // When reading, we don't know if we are going to get EOF (0 bytes read), so
38 // we typically have a buffer that we allocated but did not use. We keep 42 // we typically have a buffer that we allocated but did not use. We keep
39 // this buffer around for the next read as a small optimization. 43 // this buffer around for the next read as a small optimization.
40 static SharedIOBuffer* spare_read_buffer_; 44 static SharedIOBuffer* spare_read_buffer_;
41 45
42 scoped_refptr<SharedIOBuffer> read_buffer_; 46 scoped_refptr<SharedIOBuffer> read_buffer_;
43 ResourceDispatcherHost::Receiver* receiver_; 47 ResourceDispatcherHost::Receiver* receiver_;
44 int render_process_host_id_; 48 int render_process_host_id_;
45 int routing_id_; 49 int routing_id_;
46 base::ProcessHandle render_process_; 50 base::ProcessHandle render_process_;
47 ResourceDispatcherHost* rdh_; 51 ResourceDispatcherHost* rdh_;
48 52
49 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); 53 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler);
50 }; 54 };
51 55
52 #endif // CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 56 #endif // CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | net/base/ssl_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698