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

Unified Diff: content/browser/loader/navigation_url_loader_network_service.h

Issue 2924723002: Network service: SafeBrowsing check for frame-resources from browser. (Closed)
Patch Set: . Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/navigation_url_loader_network_service.h
diff --git a/content/browser/loader/navigation_url_loader_network_service.h b/content/browser/loader/navigation_url_loader_network_service.h
index 204e4f4779ac0773b5c4a17d638eb5cd6e348f33..6e57f8ff2bdc9903c84e9efac78bf754a9da54f8 100644
--- a/content/browser/loader/navigation_url_loader_network_service.h
+++ b/content/browser/loader/navigation_url_loader_network_service.h
@@ -6,12 +6,10 @@
#define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "content/browser/loader/navigation_url_loader.h"
#include "content/common/url_loader.mojom.h"
-#include "content/common/url_loader_factory.mojom.h"
#include "content/public/browser/ssl_status.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "services/service_manager/public/cpp/connector.h"
namespace net {
struct RedirectInfo;
@@ -24,8 +22,7 @@ class NavigationPostDataHandler;
// This is an implementation of NavigationURLLoader used when
// --enable-network-service is used.
-class NavigationURLLoaderNetworkService : public NavigationURLLoader,
- public mojom::URLLoaderClient {
+class NavigationURLLoaderNetworkService : public NavigationURLLoader {
public:
// The caller is responsible for ensuring that |delegate| outlives the loader.
NavigationURLLoaderNetworkService(
@@ -42,36 +39,27 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader,
void FollowRedirect() override;
void ProceedWithResponse() override;
- // mojom::URLLoaderClient implementation:
void OnReceiveResponse(const ResourceResponseHead& head,
const base::Optional<net::SSLInfo>& ssl_info,
- mojom::DownloadedTempFilePtr downloaded_file) override;
+ mojom::DownloadedTempFilePtr downloaded_file);
void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
- const ResourceResponseHead& head) override;
- void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override;
- void OnUploadProgress(int64_t current_position,
- int64_t total_size,
- OnUploadProgressCallback callback) override;
- void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
- void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
- void OnStartLoadingResponseBody(
- mojo::ScopedDataPipeConsumerHandle body) override;
- void OnComplete(
- const ResourceRequestCompletionStatus& completion_status) override;
+ const ResourceResponseHead& head);
+ void OnStartLoadingResponseBody(mojo::ScopedDataPipeConsumerHandle body);
+ void OnComplete(const ResourceRequestCompletionStatus& completion_status);
private:
class URLLoaderRequestController;
NavigationURLLoaderDelegate* delegate_;
- mojo::Binding<mojom::URLLoaderClient> binding_;
- mojom::URLLoaderPtr url_loader_ptr_;
scoped_refptr<ResourceResponse> response_;
SSLStatus ssl_status_;
// Lives on the IO thread.
std::unique_ptr<URLLoaderRequestController> request_controller_;
+ base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService);
};

Powered by Google App Engine
This is Rietveld 408576698