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

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

Issue 2843043002: network service: Create URLLoader for service worker navigation case
Patch Set: network fallback in simple cases 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 "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/loader/navigation_url_loader.h" 10 #include "content/browser/loader/navigation_url_loader.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void OnUploadProgress(int64_t current_position, 59 void OnUploadProgress(int64_t current_position,
60 int64_t total_size, 60 int64_t total_size,
61 OnUploadProgressCallback callback) override; 61 OnUploadProgressCallback callback) override;
62 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; 62 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
63 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; 63 void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
64 void OnStartLoadingResponseBody( 64 void OnStartLoadingResponseBody(
65 mojo::ScopedDataPipeConsumerHandle body) override; 65 mojo::ScopedDataPipeConsumerHandle body) override;
66 void OnComplete( 66 void OnComplete(
67 const ResourceRequestCompletionStatus& completion_status) override; 67 const ResourceRequestCompletionStatus& completion_status) override;
68 68
69 // Initiates the request.
70 void StartURLRequest(std::unique_ptr<ResourceRequest> request);
71
72 private: 69 private:
73 void ConnectURLLoaderFactory( 70 void StartURLRequest(mojom::URLLoaderFactoryPtrInfo url_loader_factory_info,
74 std::unique_ptr<service_manager::Connector> connector); 71 std::unique_ptr<ResourceRequest> request);
75
76 mojom::URLLoaderFactory& GetURLLoaderFactory();
77 72
78 NavigationURLLoaderDelegate* delegate_; 73 NavigationURLLoaderDelegate* delegate_;
79 74
75 mojom::URLLoaderFactoryPtr url_loader_factory_;
80 mojo::Binding<mojom::URLLoaderClient> binding_; 76 mojo::Binding<mojom::URLLoaderClient> binding_;
81 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; 77 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_;
82 scoped_refptr<ResourceResponse> response_; 78 scoped_refptr<ResourceResponse> response_;
83 SSLStatus ssl_status_; 79 SSLStatus ssl_status_;
80 std::unique_ptr<ResourceRequest> new_request_;
84 81
85 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_; 82 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_;
86 83
87 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService); 84 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService);
88 }; 85 };
89 86
90 } // namespace content 87 } // namespace content
91 88
92 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ 89 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698