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

Side by Side Diff: mojo/services/network/public/interfaces/url_loader.mojom

Issue 1404443004: Move //mojo/services/network/public/interfaces to //mojo/services/network/interfaces. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add some missing dependencies Created 5 years, 2 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 [DartPackage="mojo_services"]
6 module mojo;
7
8 import "mojo/public/interfaces/network/network_error.mojom";
9 import "mojo/public/interfaces/network/url_request.mojom";
10 import "mojo/public/interfaces/network/url_response.mojom";
11
12 struct URLLoaderStatus {
13 // If the loader has failed due to a network level error, this field will be
14 // set.
15 NetworkError? error;
16
17 // Set to true if the URLLoader is still working. Set to false once an error
18 // is encountered or the response body is completely copied to the response
19 // body stream.
20 bool is_loading;
21
22 // TODO(darin): Add further details about the stages of loading (e.g.,
23 // "resolving host") that happen prior to receiving bytes.
24 };
25
26 interface URLLoader {
27 // Loads the given |request|, asynchronously producing |response|. Consult
28 // |response| to determine if the request resulted in an error, was
29 // redirected, or has a response body to be consumed.
30 Start(URLRequest request) => (URLResponse response);
31
32 // If the request passed to |Start| had |auto_follow_redirects| set to false,
33 // then upon receiving an URLResponse with a non-NULL |redirect_url| field,
34 // |FollowRedirect| may be called to load the URL indicated by the redirect.
35 FollowRedirect() => (URLResponse response);
36
37 // Query status about the URLLoader.
38 QueryStatus() => (URLLoaderStatus status);
39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698