| 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 #ifndef CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 33 // ResourceHandler implementation: | 33 // ResourceHandler implementation: |
| 34 virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); | 34 virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); |
| 35 virtual bool OnRequestRedirected(int request_id, const GURL& new_url, | 35 virtual bool OnRequestRedirected(int request_id, const GURL& new_url, |
| 36 ResourceResponse* response, bool* defer); | 36 ResourceResponse* response, bool* defer); |
| 37 virtual bool OnResponseStarted(int request_id, ResourceResponse* response); | 37 virtual bool OnResponseStarted(int request_id, ResourceResponse* response); |
| 38 virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); | 38 virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); |
| 39 virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, | 39 virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, |
| 40 int min_size); | 40 int min_size); |
| 41 virtual bool OnReadCompleted(int request_id, int* bytes_read); | 41 virtual bool OnReadCompleted(int request_id, int* bytes_read); |
| 42 virtual bool OnResponseCompleted(int request_id, | 42 virtual bool OnResponseCompleted(int request_id, |
| 43 const URLRequestStatus& status, | 43 const net::URLRequestStatus& status, |
| 44 const std::string& security_info); | 44 const std::string& security_info); |
| 45 virtual void OnRequestClosed(); | 45 virtual void OnRequestClosed(); |
| 46 | 46 |
| 47 // chromeos::OfflineLoadPage::Delegate | 47 // chromeos::OfflineLoadPage::Delegate |
| 48 virtual void OnBlockingPageComplete(bool proceed); | 48 virtual void OnBlockingPageComplete(bool proceed); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // Erease the state assocaited with a deferred load request. | 51 // Erease the state assocaited with a deferred load request. |
| 52 void ClearRequestInfo(); | 52 void ClearRequestInfo(); |
| 53 bool IsRemote(const GURL& url) const; | 53 bool IsRemote(const GURL& url) const; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 69 net::URLRequest* request_; | 69 net::URLRequest* request_; |
| 70 | 70 |
| 71 // The state for deferred load quest. | 71 // The state for deferred load quest. |
| 72 int deferred_request_id_; | 72 int deferred_request_id_; |
| 73 GURL deferred_url_; | 73 GURL deferred_url_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(OfflineResourceHandler); | 75 DISALLOW_COPY_AND_ASSIGN(OfflineResourceHandler); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ | 78 #endif // CHROME_BROWSER_RENDERER_HOST_OFFLINE_RESOURCE_HANDLER_H_ |
| OLD | NEW |