OLD | NEW |
1 // Copyright (c) 2010 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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/singleton.h" | 11 #include "base/singleton.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 request_id, new_url, response, defer); | 46 request_id, new_url, response, defer); |
47 } | 47 } |
48 | 48 |
49 bool OfflineResourceHandler::OnResponseStarted(int request_id, | 49 bool OfflineResourceHandler::OnResponseStarted(int request_id, |
50 ResourceResponse* response) { | 50 ResourceResponse* response) { |
51 return next_handler_->OnResponseStarted(request_id, response); | 51 return next_handler_->OnResponseStarted(request_id, response); |
52 } | 52 } |
53 | 53 |
54 bool OfflineResourceHandler::OnResponseCompleted( | 54 bool OfflineResourceHandler::OnResponseCompleted( |
55 int request_id, | 55 int request_id, |
56 const URLRequestStatus& status, | 56 const net::URLRequestStatus& status, |
57 const std::string& security_info) { | 57 const std::string& security_info) { |
58 return next_handler_->OnResponseCompleted(request_id, status, security_info); | 58 return next_handler_->OnResponseCompleted(request_id, status, security_info); |
59 } | 59 } |
60 | 60 |
61 void OfflineResourceHandler::OnRequestClosed() { | 61 void OfflineResourceHandler::OnRequestClosed() { |
62 next_handler_->OnRequestClosed(); | 62 next_handler_->OnRequestClosed(); |
63 } | 63 } |
64 | 64 |
65 bool OfflineResourceHandler::OnWillStart(int request_id, | 65 bool OfflineResourceHandler::OnWillStart(int request_id, |
66 const GURL& url, | 66 const GURL& url, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 DVLOG(1) << "Resume load: this=" << this << ", request id=" << request_id; | 151 DVLOG(1) << "Resume load: this=" << this << ", request id=" << request_id; |
152 next_handler_->OnWillStart(request_id, url, &defer); | 152 next_handler_->OnWillStart(request_id, url, &defer); |
153 if (!defer) | 153 if (!defer) |
154 rdh_->StartDeferredRequest(process_host_id_, request_id); | 154 rdh_->StartDeferredRequest(process_host_id_, request_id); |
155 } | 155 } |
156 | 156 |
157 void OfflineResourceHandler::ShowOfflinePage() { | 157 void OfflineResourceHandler::ShowOfflinePage() { |
158 chromeos::OfflineLoadPage::Show( | 158 chromeos::OfflineLoadPage::Show( |
159 process_host_id_, render_view_id_, deferred_url_, this); | 159 process_host_id_, render_view_id_, deferred_url_, this); |
160 } | 160 } |
OLD | NEW |