Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / extensions / api / data_reduction_proxy / data_reduction_proxy_api.cc
blob824433ceb50134b2f969e36cd7408a72dbb5c19a
1 // Copyright 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.
5 #include "chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.h"
7 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h"
10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
12 namespace extensions {
14 AsyncExtensionFunction::ResponseAction
15 DataReductionProxyClearDataSavingsFunction::Run() {
16 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
17 data_reduction_proxy::DataReductionProxySettings* settings =
18 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
19 browser_context());
20 settings->data_reduction_proxy_service()->compression_stats()->
21 ClearDataSavingStatistics();
22 return RespondNow(NoArguments());
25 } // namespace extensions