File: client_config.proto

package info (click to toggle)
chromium-browser 57.0.2987.98-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,637,852 kB
  • ctags: 2,544,394
  • sloc: cpp: 12,815,961; ansic: 3,676,222; python: 1,147,112; asm: 526,608; java: 523,212; xml: 286,794; perl: 92,654; sh: 86,408; objc: 73,271; makefile: 27,698; cs: 18,487; yacc: 13,031; tcl: 12,957; pascal: 4,875; ml: 4,716; lex: 3,904; sql: 3,862; ruby: 1,982; lisp: 1,508; php: 1,368; exp: 404; awk: 325; csh: 117; jsp: 39; sed: 37
file content (142 lines) | stat: -rw-r--r-- 5,185 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package data_reduction_proxy;

// The client configuration information for using the Data Saver service.
message ClientConfig {
  // An opaque per-session key assigned by the server which permits use of the
  // Data Saver HTTP proxy servers.
  optional string session_key = 1;
  // The time at which the client should request a new configuration. The
  // session_key is guaranteed to be valid through this time and may be valid
  // for some time thereafter.
  optional Timestamp DEPRECATED_refresh_time = 2 [deprecated = true];
  // The proxy configuration the client should use to connect to the Data Saver
  // service.
  optional ProxyConfig proxy_config = 3;
  // The duration after which the client should request a new configuration. The
  // session_key is guaranteed to be valid through this time and may be valid
  // for some time thereafter. If both refresh_duration and refresh_time are
  // present, refresh_duration should take priority.
  optional Duration refresh_duration = 4;
  // Configuration information for reporting pageload metrics.
  optional PageloadMetricsConfig pageload_metrics_config = 5;
}

// The configuration for reporting pageload metrics.
message PageloadMetricsConfig {
  // The fraction of pageloads for which to report pageload metrics.
  optional float reporting_fraction = 1;
}

// N.B.:
// The configuration service that sends the ClientConfig uses Timestamp and
// Duration to conform to Google API standards. These proto messages should
// live in a shared location in the Chromium tree, but for now we duplicate
// them here.

// A Timestamp represents a point in time independent of any time zone
// or calendar, represented as seconds and fractions of seconds at
// nanosecond resolution in UTC Epoch time.
message Timestamp {
  // Represents seconds of UTC time since Unix epoch
  // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
  // 9999-12-31T23:59:59Z inclusive.
  optional int64 seconds = 1;

  // Non-negative fractions of a second at nanosecond resolution. Negative
  // second values with fractions must still have non-negative nanos values
  // that count forward in time. Must be from 0 to 999,999,999
  // inclusive.
  optional int32 nanos = 2;
}

// A Duration represents a signed, fixed-length span of time represented
// as a count of seconds and fractions of seconds at nanosecond
// resolution. It is independent of any calendar and concepts like "day"
// or "month". It is related to Timestamp in that the difference between
// two Timestamp values is a Duration and it can be added or subtracted
// from a Timestamp. Range is approximately +-10,000 years.
message Duration {
  // Signed seconds of the span of time. Must be from -315,576,000,000
  // to +315,576,000,000 inclusive.
  optional int64 seconds = 1;

  // Signed fractions of a second at nanosecond resolution of the span
  // of time. Durations less than one second are represented with a 0
  // `seconds` field and a positive or negative `nanos` field. For durations
  // of one second or more, a non-zero value for the `nanos` field must be
  // of the same sign as the `seconds` field. Must be from -999,999,999
  // to +999,999,999 inclusive.
  optional int32 nanos = 2;
}

// Data Saver proxy configuration.
message ProxyConfig {
  // Provides proxy server information for HTTP URIs.
  repeated ProxyServer http_proxy_servers = 1;
}

// Configuration information for a specific proxy server.
message ProxyServer {
  // The scheme of the proxy server.
  enum ProxyScheme {
    // The proxy scheme is unspecified.
    UNSPECIFIED = 0;
    // HTTP
    HTTP = 1;
    // HTTPS
    HTTPS = 2;
    // HTTPS over QUIC
    DEPRECATED_QUIC = 3 [deprecated = true];
  }

  // The deployment type of the proxy server.
  enum ProxyType {
    // The proxy type is unspecified.
    UNSPECIFIED_TYPE = 0;
    // Core Google datacenter.
    CORE = 1;
  }

  // The scheme for the proxy server.
  optional ProxyScheme scheme = 1;
  // The host name for the proxy server.
  optional string host = 2;
  // The port number for the proxy server.
  optional int32 port = 3;
  // The type for the proxy server.
  optional ProxyType type = 4;
}

// Request object to create a client configuration object.
message CreateClientConfigRequest {
  // A previous per-session key that was assigned by the service.
  optional string session_key = 1;

  // Build version information.
  optional VersionInfo version_info = 2;
}

// Build version information.
message VersionInfo {
  // The client's platform type. See
  // components/data_reduction_proxy/core/common/data_reduction_proxy_util.h for
  // allowed strings in CLIENT_ENUMS_LIST.
  optional string client = 1;

  // The build number, e.g. 2171
  optional int32 build = 2;

  // The patch number of the chromium client: always a non-negative integer.
  optional int32 patch = 3;

  // The production channel, e.g. "canary", "dev", "beta", "stable".
  optional string channel = 4;
}