Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/renderer/resources/extensions/data_reduction_proxy.js

Issue 1048113003: Implementation of API to clear savings data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ClearSavingsData
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 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
5 // Custom binding for the dataReductionProxy API
6
7 var sendRequest = require('sendRequest').sendRequest;
8 var validate = require('schemaUtils').validate;
9
10 function extendSchema(schema) {
11 var extendedSchema = $Array.slice(schema);
12 extendedSchema.unshift({'type': 'string'});
13 return extendedSchema;
14 }
15
16 function DataSavings(contentType, settingSchema) {
17 this.clear = function(details, callback) {
18 var clearSchema = this.functionSchemas.clear.definition.parameters;
19 validate([details, callback], clearSchema);
20 return sendRequest('dataReductionProxy.dataSavings.clear',
21 [contentType, details, callback],
22 extendSchema(clearSchema));
23 };
24 }
25
26 exports.DataSavings = DataSavings;
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc ('k') | chrome/renderer/resources/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698