| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 friend class NavigationURLLoaderImplCore; | 44 friend class NavigationURLLoaderImplCore; |
| 45 | 45 |
| 46 // Notifies the delegate of a redirect. | 46 // Notifies the delegate of a redirect. |
| 47 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, | 47 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, |
| 48 const scoped_refptr<ResourceResponse>& response); | 48 const scoped_refptr<ResourceResponse>& response); |
| 49 | 49 |
| 50 // Notifies the delegate that the response has started. | 50 // Notifies the delegate that the response has started. |
| 51 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, | 51 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, |
| 52 std::unique_ptr<StreamHandle> body, | 52 std::unique_ptr<StreamHandle> body, |
| 53 const SSLStatus& ssl_status, | 53 const SSLStatus& ssl_status, |
| 54 std::unique_ptr<NavigationData> navigation_data); | 54 std::unique_ptr<NavigationData> navigation_data, |
| 55 bool is_download); |
| 55 | 56 |
| 56 // Notifies the delegate the request failed to return a response. | 57 // Notifies the delegate the request failed to return a response. |
| 57 void NotifyRequestFailed(bool in_cache, int net_error); | 58 void NotifyRequestFailed(bool in_cache, int net_error); |
| 58 | 59 |
| 59 // Notifies the delegate the begin navigation request was handled and a | 60 // Notifies the delegate the begin navigation request was handled and a |
| 60 // potential first network request is about to be made. | 61 // potential first network request is about to be made. |
| 61 void NotifyRequestStarted(base::TimeTicks timestamp); | 62 void NotifyRequestStarted(base::TimeTicks timestamp); |
| 62 | 63 |
| 63 NavigationURLLoaderDelegate* delegate_; | 64 NavigationURLLoaderDelegate* delegate_; |
| 64 | 65 |
| 65 // |core_| is deleted on the IO thread in a subsequent task when the | 66 // |core_| is deleted on the IO thread in a subsequent task when the |
| 66 // NavigationURLLoaderImpl goes out of scope. | 67 // NavigationURLLoaderImpl goes out of scope. |
| 67 NavigationURLLoaderImplCore* core_; | 68 NavigationURLLoaderImplCore* core_; |
| 68 | 69 |
| 69 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; | 70 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); | 72 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 } // namespace content | 75 } // namespace content |
| 75 | 76 |
| 76 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ | 77 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| OLD | NEW |