OLD | NEW |
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_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 int render_view_id, | 26 int render_view_id, |
27 const GURL& url, | 27 const GURL& url, |
28 SaveFileManager* manager); | 28 SaveFileManager* manager); |
29 virtual ~SaveFileResourceHandler(); | 29 virtual ~SaveFileResourceHandler(); |
30 | 30 |
31 // ResourceHandler Implementation: | 31 // ResourceHandler Implementation: |
32 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE; | 32 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE; |
33 | 33 |
34 // Saves the redirected URL to final_url_, we need to use the original | 34 // Saves the redirected URL to final_url_, we need to use the original |
35 // URL to match original request. | 35 // URL to match original request. |
36 virtual bool OnRequestRedirected(const GURL& url, | 36 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
37 ResourceResponse* response, | 37 ResourceResponse* response, |
38 bool* defer) OVERRIDE; | 38 bool* defer) OVERRIDE; |
39 | 39 |
40 // Sends the download creation information to the download thread. | 40 // Sends the download creation information to the download thread. |
41 virtual bool OnResponseStarted(ResourceResponse* response, | 41 virtual bool OnResponseStarted(ResourceResponse* response, |
42 bool* defer) OVERRIDE; | 42 bool* defer) OVERRIDE; |
43 | 43 |
44 // Pass-through implementation. | 44 // Pass-through implementation. |
45 virtual bool OnWillStart(const GURL& url, bool* defer) OVERRIDE; | 45 virtual bool OnWillStart(const GURL& url, bool* defer) OVERRIDE; |
46 | 46 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 SaveFileManager* save_manager_; | 84 SaveFileManager* save_manager_; |
85 | 85 |
86 static const int kReadBufSize = 32768; // bytes | 86 static const int kReadBufSize = 32768; // bytes |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(SaveFileResourceHandler); | 88 DISALLOW_COPY_AND_ASSIGN(SaveFileResourceHandler); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace content | 91 } // namespace content |
92 | 92 |
93 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ | 93 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_ |
OLD | NEW |