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

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

Issue 1416953007: Add a function to add extra headers from NavigationThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data-reduction-proxy-resource-throttle
Patch Set: Fixed compilation issue Created 5 years, 1 month 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_CORE_H_ 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 27 matching lines...) Expand all
38 explicit NavigationURLLoaderImplCore( 38 explicit NavigationURLLoaderImplCore(
39 const base::WeakPtr<NavigationURLLoaderImpl>& loader); 39 const base::WeakPtr<NavigationURLLoaderImpl>& loader);
40 ~NavigationURLLoaderImplCore(); 40 ~NavigationURLLoaderImplCore();
41 41
42 // Starts the request. 42 // Starts the request.
43 void Start(ResourceContext* resource_context, 43 void Start(ResourceContext* resource_context,
44 ServiceWorkerNavigationHandleCore* service_worker_handle_core, 44 ServiceWorkerNavigationHandleCore* service_worker_handle_core,
45 scoped_ptr<NavigationRequestInfo> request_info); 45 scoped_ptr<NavigationRequestInfo> request_info);
46 46
47 // Follows the current pending redirect. 47 // Follows the current pending redirect.
48 void FollowRedirect(); 48 void FollowRedirect(
49 const std::vector<std::pair<std::string, std::string>>& extra_headers);
49 50
50 void set_resource_handler(NavigationResourceHandler* resource_handler) { 51 void set_resource_handler(NavigationResourceHandler* resource_handler) {
51 resource_handler_ = resource_handler; 52 resource_handler_ = resource_handler;
52 } 53 }
53 54
54 // Notifies |loader_| on the UI thread that the request was redirected. 55 // Notifies |loader_| on the UI thread that the request was redirected.
55 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, 56 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info,
56 ResourceResponse* response); 57 ResourceResponse* response);
57 58
58 // Notifies |loader_| on the UI thread that the response started. 59 // Notifies |loader_| on the UI thread that the response started.
59 void NotifyResponseStarted(ResourceResponse* response, 60 void NotifyResponseStarted(ResourceResponse* response,
60 scoped_ptr<StreamHandle> body); 61 scoped_ptr<StreamHandle> body);
61 62
62 // Notifies |loader_| on the UI thread that the request failed. 63 // Notifies |loader_| on the UI thread that the request failed.
63 void NotifyRequestFailed(bool in_cache, int net_error); 64 void NotifyRequestFailed(bool in_cache, int net_error);
64 65
65 private: 66 private:
66 base::WeakPtr<NavigationURLLoaderImpl> loader_; 67 base::WeakPtr<NavigationURLLoaderImpl> loader_;
67 NavigationResourceHandler* resource_handler_; 68 NavigationResourceHandler* resource_handler_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImplCore); 70 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImplCore);
70 }; 71 };
71 72
72 } // namespace content 73 } // namespace content
73 74
74 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ 75 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698