| // Copyright 2014 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. |
| |
| [ |
| { |
| "namespace": "dataReductionProxy", |
| "description": "Use the <code>chrome.dataReductionProxy</code> API to control the data reduction proxy and access usage metrics. This API relies on the <a href='types#ChromeSetting'>ChromeSetting prototype of the type API</a> for getting and setting Chrome's configuration.", |
| "properties": { |
| "spdyProxyEnabled": { |
| "nocompile": true, |
| "$ref": "types.ChromeSetting", |
| "value": ["spdy_proxy.enabled", {"type":"boolean"}], |
| "description": "Flag to enable data usage reduction by sending requests via data reduction proxy. This preference's value is a boolean, defaulting to <code>false</code>." |
| }, |
| "dataReductionDailyContentLength": { |
| "nocompile": true, |
| "$ref": "types.ChromeSetting", |
| "value": ["data_reduction.daily_original_length", {"type":"array"}], |
| "description": "Each item contains the number uncompressed bytes through data reduction proxy per day." |
| }, |
| "dataReductionDailyReceivedLength": { |
| "nocompile": true, |
| "$ref": "types.ChromeSetting", |
| "value": ["data_reduction.daily_received_length", {"type":"array"}], |
| "description": "Each item contains the number of compressed bytes through data reduction proxy per day." |
| }, |
| "dataUsageReportingEnabled": { |
| "nocompile": true, |
| "$ref": "types.ChromeSetting", |
| "value": ["data_usage_reporting.enabled", {"type":"boolean"}], |
| "description": "Flag to enable collection and reporting of detailed data usage." |
| } |
| }, |
| "functions": [ |
| { |
| "name": "clearDataSavings", |
| "type": "function", |
| "description": "Clear all data saving metrics obtained by using the data reduction proxy.", |
| "parameters": [ |
| { |
| "type": "function", |
| "name": "callback", |
| "description": "Callback to call after data savings have been cleared", |
| "optional": true, |
| "parameters": [] |
| } |
| ] |
| }, |
| { |
| "name": "getDataUsage", |
| "type": "function", |
| "description": "Get data usage history.", |
| "parameters": [ |
| { |
| "type": "function", |
| "name": "getDataUsageCallback", |
| "description": "Callback to call with data usage history", |
| "optional": true, |
| "parameters": [ |
| { |
| "name": "data_usage", |
| "type": "object", |
| "description": "Data usage history.", |
| "properties": { |
| "data_usage_buckets": { |
| "type": "array", |
| "description": "Data usage for the past 60 days broken down by time intervals. Each element contains data usage for |kDataUsageBucketLengthMins| minutes.", |
| "items": { |
| "type": "any", |
| "description": "Array of per-connection data usage. Each element contains data usage for a connection-type." |
| } |
| } |
| } |
| } |
| ] |
| } |
| ] |
| } |
| ] |
| } |
| ] |