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

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

Issue 2874163004: Add support in the network service for different contexts. (Closed)
Patch Set: review comment and clang fixes Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_NETWORK_SERVICE_H_ 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/loader/navigation_url_loader.h" 9 #include "content/browser/loader/navigation_url_loader.h"
10 #include "content/common/content_export.h"
11 #include "content/common/url_loader.mojom.h" 10 #include "content/common/url_loader.mojom.h"
12 #include "content/common/url_loader_factory.mojom.h" 11 #include "content/common/url_loader_factory.mojom.h"
13 #include "content/public/browser/ssl_status.h" 12 #include "content/public/browser/ssl_status.h"
14 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
15 #include "services/service_manager/public/cpp/connector.h" 14 #include "services/service_manager/public/cpp/connector.h"
16 15
17 namespace net { 16 namespace net {
18 struct RedirectInfo; 17 struct RedirectInfo;
19 } 18 }
20 19
(...skipping 11 matching lines...) Expand all
32 NavigationURLLoaderNetworkService( 31 NavigationURLLoaderNetworkService(
33 ResourceContext* resource_context, 32 ResourceContext* resource_context,
34 StoragePartition* storage_partition, 33 StoragePartition* storage_partition,
35 std::unique_ptr<NavigationRequestInfo> request_info, 34 std::unique_ptr<NavigationRequestInfo> request_info,
36 std::unique_ptr<NavigationUIData> navigation_ui_data, 35 std::unique_ptr<NavigationUIData> navigation_ui_data,
37 ServiceWorkerNavigationHandle* service_worker_handle, 36 ServiceWorkerNavigationHandle* service_worker_handle,
38 AppCacheNavigationHandle* appcache_handle, 37 AppCacheNavigationHandle* appcache_handle,
39 NavigationURLLoaderDelegate* delegate); 38 NavigationURLLoaderDelegate* delegate);
40 ~NavigationURLLoaderNetworkService() override; 39 ~NavigationURLLoaderNetworkService() override;
41 40
42 // Overrides the URLLoaderFactory for subsequent requests. Passing a null
43 // pointer will restore the default behavior.
44 static CONTENT_EXPORT void OverrideURLLoaderFactoryForTesting(
45 mojom::URLLoaderFactoryPtr url_loader_factory);
46
47 // NavigationURLLoader implementation: 41 // NavigationURLLoader implementation:
48 void FollowRedirect() override; 42 void FollowRedirect() override;
49 void ProceedWithResponse() override; 43 void ProceedWithResponse() override;
50 44
51 // mojom::URLLoaderClient implementation: 45 // mojom::URLLoaderClient implementation:
52 void OnReceiveResponse(const ResourceResponseHead& head, 46 void OnReceiveResponse(const ResourceResponseHead& head,
53 const base::Optional<net::SSLInfo>& ssl_info, 47 const base::Optional<net::SSLInfo>& ssl_info,
54 mojom::DownloadedTempFilePtr downloaded_file) override; 48 mojom::DownloadedTempFilePtr downloaded_file) override;
55 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, 49 void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
56 const ResourceResponseHead& head) override; 50 const ResourceResponseHead& head) override;
(...skipping 16 matching lines...) Expand all
73 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; 67 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_;
74 scoped_refptr<ResourceResponse> response_; 68 scoped_refptr<ResourceResponse> response_;
75 SSLStatus ssl_status_; 69 SSLStatus ssl_status_;
76 70
77 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService); 71 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService);
78 }; 72 };
79 73
80 } // namespace content 74 } // namespace content
81 75
82 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ 76 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/loader/navigation_url_loader_network_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698