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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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_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 "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 22 matching lines...) Expand all
33 33
34 // Called in response to OnRequestRedirected to continue processing the 34 // Called in response to OnRequestRedirected to continue processing the
35 // request. 35 // request.
36 void FollowRedirect() override; 36 void FollowRedirect() override;
37 37
38 private: 38 private:
39 friend class NavigationURLLoaderImplCore; 39 friend class NavigationURLLoaderImplCore;
40 40
41 // Notifies the delegate of a redirect. 41 // Notifies the delegate of a redirect.
42 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, 42 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info,
43 const scoped_refptr<ResourceResponse>& response); 43 const scoped_refptr<ResourceResponse>& response,
44 bool is_external_protocol);
44 45
45 // Notifies the delegate that the response has started. 46 // Notifies the delegate that the response has started.
46 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, 47 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response,
47 scoped_ptr<StreamHandle> body); 48 scoped_ptr<StreamHandle> body);
48 49
49 // Notifies the delegate the request failed to return a response. 50 // Notifies the delegate the request failed to return a response.
50 void NotifyRequestFailed(bool in_cache, int net_error); 51 void NotifyRequestFailed(bool in_cache, int net_error);
51 52
52 // Notifies the delegate the begin navigation request was handled and a 53 // Notifies the delegate the begin navigation request was handled and a
53 // potential first network request is about to be made. 54 // potential first network request is about to be made.
54 void NotifyRequestStarted(base::TimeTicks timestamp); 55 void NotifyRequestStarted(base::TimeTicks timestamp);
55 56
56 NavigationURLLoaderDelegate* delegate_; 57 NavigationURLLoaderDelegate* delegate_;
57 58
58 // |core_| is deleted on the IO thread in a subsequent task when the 59 // |core_| is deleted on the IO thread in a subsequent task when the
59 // NavigationURLLoaderImpl goes out of scope. 60 // NavigationURLLoaderImpl goes out of scope.
60 NavigationURLLoaderImplCore* core_; 61 NavigationURLLoaderImplCore* core_;
61 62
62 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; 63 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); 65 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl);
65 }; 66 };
66 67
67 } // namespace content 68 } // namespace content
68 69
69 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ 70 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698