blob: 007cd1c4a6b97e8fe360f2d8260d4854c8a8cf43 [file] [log] [blame]
// Copyright 2018 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.
module data_reduction_proxy.mojom;
import "mojo/public/mojom/base/time.mojom";
import "services/network/public/mojom/proxy_config.mojom";
import "services/proxy_resolver/public/mojom/proxy_resolver.mojom";
struct DataReductionProxyServer {
proxy_resolver.mojom.ProxyServer proxy_server;
bool is_core;
};
// Configuration that is synchronized to the
// DataReductionProxyURLLoaderThrottle.
struct DataReductionProxyThrottleConfig {
// The currently configured proxies.
array<DataReductionProxyServer> proxies_for_http;
};
interface DataReductionProxyThrottleConfigObserver {
OnThrottleConfigChanged(DataReductionProxyThrottleConfig config);
};
// Interface used by URLLoaderThrottles (which may be running in a renderer)
// to interact with the Data Reduction Proxy settings (which may be implemented
// by the the browser/network service process).
interface DataReductionProxy {
// Marks the given Data Reduction Proxies as temporarily bad,
// so they are bypassed for some period of time
// |bypass_duration|.
MarkProxiesAsBad(mojo_base.mojom.TimeDelta bypass_duration,
network.mojom.ProxyList bad_proxies) => ();
AddThrottleConfigObserver(DataReductionProxyThrottleConfigObserver observer);
Clone(DataReductionProxy& request);
};