MDM Third Party Cookies Restriction
Implemented Third Party Cookies (TPC) Restriction.
The control point is in the native code (cookie_settings.cc),
and we make use of the PrefServiceBridge to activate and
configure the restriction. To support this we've added two
new boolean preference keys (kMdmBlockThirdPartyCookiesManaged and
kMdmBlockThirdPartyCookies).
Note that when the restriction is in effect, it overrides the
'normal' preference setting (kBlockThirdPartyCookies), which
is present in SWE, but has no current UI element. If a UI is
eventually implemented to expose this setting, the MDM restriction
code will need to be updated to disable the UI feature when the
restriction is active.
Change-Id: I929c48b3a5f932daf63468baa7f327d3ce5c78be
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index f1fc421..0f10072 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 The Android Open Source Project
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +41,7 @@
import org.chromium.base.VisibleForTesting;
import com.android.browser.R;
+import com.android.browser.mdm.ThirdPartyCookiesRestriction;
import com.android.browser.search.DefaultSearchEngine;
import com.android.browser.search.SearchEngine;
import com.android.browser.stub.NullController;
@@ -156,6 +158,9 @@
public void startController() {
Intent intent = (mSavedInstanceState == null) ? getIntent() : null;
mController.start(intent);
+
+ // MDM Restrictions not tied to a UI element initialized here.
+ ThirdPartyCookiesRestriction.getInstance();
}
@VisibleForTesting