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

Unified Diff: android_webview/browser/aw_browser_context.h

Issue 1890203002: Implement Web Restrictions in WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments, and fix a possible race in displaying error page Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_browser_context.h
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h
index eee1ac23a217f4e0267015084e9d012dd4541955..27ddc03387f822cef60f0af46b72199bb56c81d9 100644
--- a/android_webview/browser/aw_browser_context.h
+++ b/android_webview/browser/aw_browser_context.h
@@ -16,12 +16,14 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
+#include "components/web_restrictions/browser/web_restrictions_client.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "net/url_request/url_request_job_factory.h"
class GURL;
class PrefService;
+class PrefChangeRegistrar;
namespace content {
class PermissionManager;
@@ -58,6 +60,7 @@ namespace prefs {
// Used for Kerberos authentication.
extern const char kAuthAndroidNegotiateAccountType[];
extern const char kAuthServerWhitelist[];
+extern const char kWebRestrictionsAuthority[];
} // namespace prefs
@@ -96,6 +99,7 @@ class AwBrowserContext : public content::BrowserContext,
AwMessagePortService* GetMessagePortService();
policy::URLBlacklistManager* GetURLBlacklistManager();
+ web_restrictions::WebRestrictionsClient* GetWebRestrictionProvider();
// content::BrowserContext implementation.
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
@@ -129,6 +133,8 @@ class AwBrowserContext : public content::BrowserContext,
private:
void InitUserPrefService();
void CreateDataReductionProxyStatisticsIfNecessary();
+ void OnWebRestrictionsAuthorityChanged();
+
static bool data_reduction_proxy_enabled_;
// Delay, in milliseconds, before removing the legacy cache dir.
@@ -161,6 +167,9 @@ class AwBrowserContext : public content::BrowserContext,
std::unique_ptr<data_reduction_proxy::DataReductionProxyService>
data_reduction_proxy_service_;
std::unique_ptr<content::PermissionManager> permission_manager_;
+ std::unique_ptr<web_restrictions::WebRestrictionsClient>
+ web_restriction_provider_;
+ std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
Bernhard Bauer 2016/05/19 10:00:15 You could make the PrefChangeRegistrar a direct me
aberent 2016/05/19 15:44:02 Done.
DISALLOW_COPY_AND_ASSIGN(AwBrowserContext);
};

Powered by Google App Engine
This is Rietveld 408576698