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

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: . 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void OnUploadProgress(int64_t current_position, 53 void OnUploadProgress(int64_t current_position,
54 int64_t total_size, 54 int64_t total_size,
55 OnUploadProgressCallback callback) override; 55 OnUploadProgressCallback callback) override;
56 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; 56 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
57 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; 57 void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
58 void OnStartLoadingResponseBody( 58 void OnStartLoadingResponseBody(
59 mojo::ScopedDataPipeConsumerHandle body) override; 59 mojo::ScopedDataPipeConsumerHandle body) override;
60 void OnComplete( 60 void OnComplete(
61 const ResourceRequestCompletionStatus& completion_status) override; 61 const ResourceRequestCompletionStatus& completion_status) override;
62 62
63 // Initiates the request.
64 void StartURLRequest(std::unique_ptr<ResourceRequest> request);
65
66 private: 63 private:
67 void ConnectURLLoaderFactory( 64 void StartURLRequest(mojom::URLLoaderFactoryPtrInfo url_loader_factory_info,
68 std::unique_ptr<service_manager::Connector> connector); 65 std::unique_ptr<ResourceRequest> request);
69 66
70 NavigationURLLoaderDelegate* delegate_; 67 NavigationURLLoaderDelegate* delegate_;
71 68
72 mojom::URLLoaderFactoryPtr url_loader_factory_; 69 mojom::URLLoaderFactoryPtr url_loader_factory_;
73 mojo::Binding<mojom::URLLoaderClient> binding_; 70 mojo::Binding<mojom::URLLoaderClient> binding_;
74 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; 71 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_;
75 scoped_refptr<ResourceResponse> response_; 72 scoped_refptr<ResourceResponse> response_;
76 SSLStatus ssl_status_; 73 SSLStatus ssl_status_;
74 std::unique_ptr<ResourceRequest> new_request_;
77 75
78 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_; 76 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_;
79 77
80 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService); 78 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService);
81 }; 79 };
82 80
83 } // namespace content 81 } // namespace content
84 82
85 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ 83 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698