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

Side by Side Diff: components/offline_pages/core/prefetch/proto/offline_pages.proto

Issue 2873383004: [Offline Prefetch] Send GeneratePageBundleRequest to the server (Closed)
Patch Set: Address more feedback 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
(Empty)
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
3 // found in the LICENSE file.
4
5 syntax = "proto3";
6 option optimize_for = LITE_RUNTIME;
7
8 package offline_pages.proto;
9
10 import "status.proto";
11 import "timestamp.proto";
12
13 // Type of transformation applied to a web page.
14 enum Transformation {
15 // Transformation not specified.
16 TRANSFORMATION_UNSPECIFIED = 0;
17 // Minimal transformation required to provide an offline-accessible web page.
18 NO_TRANSFORMATION = 1;
19 }
20
21 // Page package format.
22 enum OutputFormat {
23 // Format not specified.
24 FORMAT_UNSPECIFIED = 0;
25 // An MHTML archive containing a single web page.
26 FORMAT_MHTML = 1;
27 }
28
29 // Response to the GeneratePageBundle request.
30 message PageBundle {
31 // The list of archives in the bundle. The distribution of pages into archives
32 // is arbitrary.
33 repeated Archive archives = 1;
34 }
35
36 // A resource containing one or more serialized offline pages.
37 message Archive {
38 // Information about the individual page(s) used to create the Archive.
39 // There will be one PageInfo message for every page in the archive, including
40 // those that encountered an error or were elided due to size considerations.
41 repeated PageInfo page_infos = 1;
42 // Format of the body.
43 OutputFormat output_format = 2;
44 // Resource name for the body which can be read via the ByteStream API.
45 // This resource will remain available for a minimum of 24 hours after the
46 // GeneratePageBundle request.
47 string body_name = 3;
48 // Length of the body in bytes.
49 int64 body_length = 4;
50 }
51
52 // Information about a single returned offline page.
53 message PageInfo {
54 // The URL of the page that was rendered.
55 string url = 1;
56 // The final URL after redirects. Empty if the final URL is url.
57 string redirect_url = 2;
58 // Status of the render attempt. If status.code != OK, fields below this will
59 // be unset. If the operation is still running, status is NotFound to
60 // indicate the page is still being processed.
61 // If the page was not returned due to bundle size limits, status is
62 // FailedPrecondition. If the page failed to render for any other reason,
63 // status is Unknown.
64 Status status = 3;
65 // Transformation that was applied to the page.
66 Transformation transformation = 4;
67 // Time the page was rendered.
68 Timestamp render_time = 5;
69 }
70
71 // Request to return a list of pages in a format suitable for offline viewing.
72 message GeneratePageBundleRequest {
73 // The client's browser's user agent string.
74 string user_agent = 1;
75 // Preferred browser language(s) as defined by
76 // [IETF BCP 47](https://tools.ietf.org/html/bcp47).
77 repeated string browser_languages = 2;
78 // Desired format of the web page archive(s).
79 OutputFormat output_format = 3;
80 // Maximum size of the generated body. If all pages' output would exceed this
81 // size, only the first N pages are returned.
82 int64 max_bundle_size_bytes = 4;
83 // The GCM registration ID that can be used to inform the client
84 // of LRO completion.
85 string gcm_registration_id = 5;
86 // List of individual page requests, in order of priority. At most 100 pages
87 // may be requested at a time.
88 repeated PageParameters pages = 6;
89 }
90
91 // Request a set of pages to be returned in a format suitable for offline
92 // viewing.
93 message PageParameters {
94 // URL of the web page to return.
95 string url = 1;
96 // Transformation to apply. Must not be TRANSFORMATION_UNSPECIFIED.
97 Transformation transformation = 2;
98 }
OLDNEW
« no previous file with comments | « components/offline_pages/core/prefetch/proto/any.proto ('k') | components/offline_pages/core/prefetch/proto/operation.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698