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

Side by Side Diff: content/browser/blob_storage/blob_url_loader_factory.h

Issue 2954853002: Use Independent URLLoader
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 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_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_
6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ 6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Creates a URLLoaderFactory interface pointer for serving blob requests. 37 // Creates a URLLoaderFactory interface pointer for serving blob requests.
38 // Called on the UI thread. 38 // Called on the UI thread.
39 void HandleRequest(mojom::URLLoaderFactoryRequest request); 39 void HandleRequest(mojom::URLLoaderFactoryRequest request);
40 40
41 // Creates a URLLoader for given Blob UUID. This method is supposed to 41 // Creates a URLLoader for given Blob UUID. This method is supposed to
42 // be called on the IO thread. 42 // be called on the IO thread.
43 // Note that given |request|'s URL is not referenced, but only method and 43 // Note that given |request|'s URL is not referenced, but only method and
44 // range headers are used. 44 // range headers are used.
45 static void CreateLoaderAndStart( 45 static void CreateLoaderAndStart(
46 mojom::URLLoaderAssociatedRequest url_loader_request, 46 mojom::URLLoaderRequest url_loader_request,
47 const ResourceRequest& request, 47 const ResourceRequest& request,
48 mojom::URLLoaderClientPtr client, 48 mojom::URLLoaderClientPtr client,
49 std::unique_ptr<storage::BlobDataHandle> blob_handle, 49 std::unique_ptr<storage::BlobDataHandle> blob_handle,
50 storage::FileSystemContext* file_system_context); 50 storage::FileSystemContext* file_system_context);
51 51
52 // mojom::URLLoaderFactory implementation: 52 // mojom::URLLoaderFactory implementation:
53 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest loader, 53 void CreateLoaderAndStart(mojom::URLLoaderRequest loader,
54 int32_t routing_id, 54 int32_t routing_id,
55 int32_t request_id, 55 int32_t request_id,
56 uint32_t options, 56 uint32_t options,
57 const ResourceRequest& request, 57 const ResourceRequest& request,
58 mojom::URLLoaderClientPtr client, 58 mojom::URLLoaderClientPtr client,
59 const net::MutableNetworkTrafficAnnotationTag& 59 const net::MutableNetworkTrafficAnnotationTag&
60 traffic_annotation) override; 60 traffic_annotation) override;
61 void SyncLoad(int32_t routing_id, 61 void SyncLoad(int32_t routing_id,
62 int32_t request_id, 62 int32_t request_id,
63 const ResourceRequest& request, 63 const ResourceRequest& request,
(...skipping 13 matching lines...) Expand all
77 77
78 // Used on the IO thread. 78 // Used on the IO thread.
79 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_; 79 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(BlobURLLoaderFactory); 81 DISALLOW_COPY_AND_ASSIGN(BlobURLLoaderFactory);
82 }; 82 };
83 83
84 } // namespace content 84 } // namespace content
85 85
86 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ 86 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_subresource_url_factory.cc ('k') | content/browser/blob_storage/blob_url_loader_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698