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
5syntax = "proto2";
6option optimize_for = LITE_RUNTIME;
7option java_package = "org.chromium.components.optimization_guide.proto";
8option java_outer_classname = "CommonTypesProto";
9
10package optimization_guide.proto;
11
12// The possible effective connection type values.
13//
14// The values should match those of //net/nqe/effective_connection_type.h in the
15// Chromium repository.
16enum EffectiveConnectionType {
17  // Effective connection type reported when the network quality is unknown.
18  EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0;
19
20  // Effective connection type reported when the Internet is unreachable,
21  // either because the device does not have a connection or because the
22  // connection is too slow to be usable.
23  EFFECTIVE_CONNECTION_TYPE_OFFLINE = 1;
24
25  // Effective connection type reported when the network has the quality of a
26  // poor 2G connection.
27  EFFECTIVE_CONNECTION_TYPE_SLOW_2G = 2;
28
29  // Effective connection type reported when the network has the quality of a
30  // faster 2G connection.
31  EFFECTIVE_CONNECTION_TYPE_2G = 3;
32
33  // Effective connection type reported when the network has the quality of a
34  // 3G connection.
35  EFFECTIVE_CONNECTION_TYPE_3G = 4;
36
37  // Effective connection type reported when the network has the quality of a
38  // 4G connection.
39  EFFECTIVE_CONNECTION_TYPE_4G = 5;
40}
41
42// Context in which the items are requested.
43enum RequestContext {
44  reserved 1;
45  // Context not specified.
46  CONTEXT_UNSPECIFIED = 0;
47  // Requesting items on page navigation.
48  CONTEXT_PAGE_NAVIGATION = 2;
49  // Requesting items as part of a batch update.
50  CONTEXT_BATCH_UPDATE = 3;
51}
52