Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: content/browser/loader/navigation_url_loader_delegate.h

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Updated test Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 const scoped_refptr<ResourceResponse>& response) = 0; 29 const scoped_refptr<ResourceResponse>& response) = 0;
30 30
31 // Called when the request receives its response. No further calls will be 31 // Called when the request receives its response. No further calls will be
32 // made to the delegate. The response body is returned as a stream in 32 // made to the delegate. The response body is returned as a stream in
33 // |body_stream|. 33 // |body_stream|.
34 virtual void OnResponseStarted( 34 virtual void OnResponseStarted(
35 const scoped_refptr<ResourceResponse>& response, 35 const scoped_refptr<ResourceResponse>& response,
36 scoped_ptr<StreamHandle> body_stream) = 0; 36 scoped_ptr<StreamHandle> body_stream) = 0;
37 37
38 // Called if the request fails before receving a response. |net_error| is a 38 // Called if the request fails before receving a response. |net_error| is a
39 // network error code for the failure. 39 // network error code for the failure. |has_stale_copy_in_cache| is true if
40 virtual void OnRequestFailed(int net_error) = 0; 40 // there is a stale copy of the unreachable page in cache.
41 virtual void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) = 0;
41 42
42 // Called after the network request has begun on the IO thread at time 43 // Called after the network request has begun on the IO thread at time
43 // |timestamp|. This is just a thread hop but is used to compare timing 44 // |timestamp|. This is just a thread hop but is used to compare timing
44 // against the pre-PlzNavigate codepath which didn't start the network request 45 // against the pre-PlzNavigate codepath which didn't start the network request
45 // until after the renderer was initialized. 46 // until after the renderer was initialized.
46 virtual void OnRequestStarted(base::TimeTicks timestamp) = 0; 47 virtual void OnRequestStarted(base::TimeTicks timestamp) = 0;
47 48
48 protected: 49 protected:
49 NavigationURLLoaderDelegate() {} 50 NavigationURLLoaderDelegate() {}
50 virtual ~NavigationURLLoaderDelegate() {} 51 virtual ~NavigationURLLoaderDelegate() {}
51 52
52 private: 53 private:
53 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderDelegate); 54 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderDelegate);
54 }; 55 };
55 56
56 } // namespace content 57 } // namespace content
57 58
58 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ 59 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_handler.cc ('k') | content/browser/loader/navigation_url_loader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698