blob: e65ae50a1361d64cfefbd2d5ee6e5402b6e53669 [file]
// Copyright 2020 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 optimization_guide.proto;
// The possible resource type values.
enum ResourceType {
RESOURCE_TYPE_UNKNOWN = 0;
// A CSS Stylesheet, maps to ResourceType::kStylesheet in the Chromium
// repository.
RESOURCE_TYPE_CSS = 1;
// An external script, maps to ResourceType::kScript in the Chromium
// repository.
RESOURCE_TYPE_SCRIPT = 2;
}
// Metadata about a subresource present on a page.
message Resource {
// The full URL of the resource.
optional string url = 1;
// The resource type of the resource.
optional ResourceType resource_type = 2;
}
// Optimization metadata associated with improving the loading predictor.
//
// It is only populated for the LOADING_PREDICTOR optimization type.
message LoadingPredictorMetadata {
// A set of subresources that are expected to be present, ordered roughly by
// priority.
//
// It is expected for the client to either preconnect to the subresource hosts
// or prefetch the subresources directly.
repeated Resource subresources = 1;
}