| Index: chrome/browser/renderer_host/data_reduction_proxy_throttling_utils_android.h
|
| diff --git a/chrome/browser/renderer_host/data_reduction_proxy_throttling_utils_android.h b/chrome/browser/renderer_host/data_reduction_proxy_throttling_utils_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..82b2cecedc86acc2b1f4ad11401e5ea7801275ab
|
| --- /dev/null
|
| +++ b/chrome/browser/renderer_host/data_reduction_proxy_throttling_utils_android.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef CHROME_BROWSER_RENDERER_HOST_DATA_REDUCTION_PROXY_THROTTLING_UTILS_ANDROID_H_
|
| +#define CHROME_BROWSER_RENDERER_HOST_DATA_REDUCTION_PROXY_THROTTLING_UTILS_ANDROID_H_
|
| +
|
| +#include "chrome/browser/safe_browsing/safe_browsing_util.h"
|
| +
|
| +class GURL;
|
| +
|
| +namespace net {
|
| +class HttpResponseHeaders;
|
| +}
|
| +
|
| +// DataReductionProxyNavigationThrottle and
|
| +// DataReductionProxyResourceThrottle check that URLs are "safe" before
|
| +// navigating to them. To be considered "safe", a URL must not be tagged as a
|
| +// phishing or malware URL by the SPDY proxy.
|
| +//
|
| +// This class contain code shared by DataReductionProxyNavigationThrottle and
|
| +// DataReductionProxyResourceThrottle.
|
| +//
|
| +// The functions are safe to use on any thread.
|
| +namespace data_reduction_proxy_throttling_utils {
|
| +// Whether a DataReductionProxyNavigationThrottle or a
|
| +// DataReductionProxyResourceThrottle can be constructed for navigating to
|
| +// |url|.
|
| +bool CanCreateThrottle(bool is_incognito,
|
| + bool is_data_reduction_proxy_available,
|
| + const GURL& url);
|
| +
|
| +// Returns the threat type based on the response headers received from teh
|
| +// proxy.
|
| +safe_browsing::SBThreatType CheckHeaders(
|
| + const net::HttpResponseHeaders* headers);
|
| +
|
| +const extern char kUnsafeUrlProceedHeader[];
|
| +} // namespace data_reduction_proxy_throttling_utils
|
| +
|
| +#endif // CHROME_BROWSER_RENDERER_HOST_DATA_REDUCTION_PROXY_THROTTLING_UTILS_ANDROID_H_
|
|
|