OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/renderer_host/offline_resource_handler.h" | 5 #include "chrome/browser/renderer_host/offline_resource_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
48 DCHECK(!appcache_completion_callback_.get()); | 48 DCHECK(!appcache_completion_callback_.get()); |
49 } | 49 } |
50 | 50 |
51 bool OfflineResourceHandler::OnUploadProgress(int request_id, | 51 bool OfflineResourceHandler::OnUploadProgress(int request_id, |
52 uint64 position, | 52 uint64 position, |
53 uint64 size) { | 53 uint64 size) { |
54 return next_handler_->OnUploadProgress(request_id, position, size); | 54 return next_handler_->OnUploadProgress(request_id, position, size); |
55 } | 55 } |
56 | 56 |
57 bool OfflineResourceHandler::OnRequestRedirected(int request_id, | 57 bool OfflineResourceHandler::OnRequestRedirected( |
58 const GURL& new_url, | 58 int request_id, |
59 ResourceResponse* response, | 59 const GURL& new_url, |
60 bool* defer) { | 60 content::ResourceResponse* response, |
| 61 bool* defer) { |
61 return next_handler_->OnRequestRedirected( | 62 return next_handler_->OnRequestRedirected( |
62 request_id, new_url, response, defer); | 63 request_id, new_url, response, defer); |
63 } | 64 } |
64 | 65 |
65 bool OfflineResourceHandler::OnResponseStarted(int request_id, | 66 bool OfflineResourceHandler::OnResponseStarted( |
66 ResourceResponse* response) { | 67 int request_id, |
| 68 content::ResourceResponse* response) { |
67 return next_handler_->OnResponseStarted(request_id, response); | 69 return next_handler_->OnResponseStarted(request_id, response); |
68 } | 70 } |
69 | 71 |
70 bool OfflineResourceHandler::OnResponseCompleted( | 72 bool OfflineResourceHandler::OnResponseCompleted( |
71 int request_id, | 73 int request_id, |
72 const net::URLRequestStatus& status, | 74 const net::URLRequestStatus& status, |
73 const std::string& security_info) { | 75 const std::string& security_info) { |
74 return next_handler_->OnResponseCompleted(request_id, status, security_info); | 76 return next_handler_->OnResponseCompleted(request_id, status, security_info); |
75 } | 77 } |
76 | 78 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 TabContents* tab_contents = render_view_host ? | 207 TabContents* tab_contents = render_view_host ? |
206 render_view_host->delegate()->GetAsTabContents() : NULL; | 208 render_view_host->delegate()->GetAsTabContents() : NULL; |
207 // There is a chance that the tab closed after we decided to show | 209 // There is a chance that the tab closed after we decided to show |
208 // the offline page on the IO thread and before we actually show the | 210 // the offline page on the IO thread and before we actually show the |
209 // offline page here on the UI thread. | 211 // offline page here on the UI thread. |
210 if (tab_contents) | 212 if (tab_contents) |
211 (new chromeos::OfflineLoadPage(tab_contents, deferred_url_, this))-> | 213 (new chromeos::OfflineLoadPage(tab_contents, deferred_url_, this))-> |
212 Show(); | 214 Show(); |
213 } | 215 } |
214 } | 216 } |
OLD | NEW |