Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / data_reduction_proxy / proto / client_config.proto
blobab3c8afd3a8d02ad8e91da8da25da28ae5ae3e1f
1 // Copyright 2015 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.
5 syntax = "proto2";
7 option optimize_for = LITE_RUNTIME;
9 package data_reduction_proxy;
11 // The client configuration information for using the Data Saver service.
12 message ClientConfig {
13   // An opaque per-session key assigned by the server which permits use of the
14   // Data Saver HTTP proxy servers.
15   optional string session_key = 1;
16   // The time at which the client should request a new configuration. The
17   // session_key is guaranteed to be valid through this time and may be valid
18   // for some time thereafter.
19   optional Timestamp refresh_time = 2;
20   // The proxy configuration the client should use to connect to the Data Saver
21   // service.
22   optional ProxyConfig proxy_config = 3;
25 // A Timestamp represents a point in time independent of any time zone
26 // or calendar, represented as seconds and fractions of seconds at
27 // nanosecond resolution in UTC Epoch time.
28 message Timestamp {
29   // Represents seconds of UTC time since Unix epoch
30   // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
31   // 9999-12-31T23:59:59Z inclusive.
32   optional int64 seconds = 1;
34   // Non-negative fractions of a second at nanosecond resolution. Negative
35   // second values with fractions must still have non-negative nanos values
36   // that count forward in time. Must be from 0 to 999,999,999
37   // inclusive.
38   optional int32 nanos = 2;
41 // Data Saver proxy configuration.
42 message ProxyConfig {
43   // Provides proxy server information for HTTP URIs.
44   repeated ProxyServer http_proxy_servers = 1;
47 // Configuration information for a specific proxy server.
48 message ProxyServer {
49   // The scheme of the proxy server.
50   enum ProxyScheme {
51     // The proxy scheme is unspecified.
52     UNSPECIFIED = 0;
53     // HTTP
54     HTTP = 1;
55     // HTTPS
56     HTTPS = 2;
57     // HTTPS over QUIC
58     QUIC = 3;
59   }
61   // The scheme for the proxy server.
62   optional ProxyScheme scheme = 1;
63   // The host name for the proxy server.
64   optional string host = 2;
65   // The port number for the proxy server.
66   optional int32 port = 3;
69 // Request object to create a client configuration object.
70 message CreateClientConfigRequest {
71   // A previous per-session key that was assigned by the service.
72   optional string session_key = 1;