Commit d8838561 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

Revert "Add domain joined check to managed device detection for DoH."

This reverts commit a50dfe61.

Reason for revert: Possible cause of crbug.com/998385.

Original change's description:
> Add domain joined check to managed device detection for DoH.
>
> Some devices may be domain joined but not have any active policies.
> We should also disable DoH by default for that scenario.
>
> Bug: 955454
> Change-Id: I50ad015e9e5d072dddcaa72524e5d39ffb2e005c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773397
> Reviewed-by: Eric Orth <ericorth@chromium.org>
> Commit-Queue: Katharine Daly <dalyk@google.com>
> Cr-Commit-Position: refs/heads/master@{#690809}

TBR=ericorth@chromium.org,dalyk@google.com

Change-Id: I22da3426da2a759230917f18b3d81d4075ecd9d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 955454
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772934Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691044}
parent 296051ea
......@@ -10,10 +10,6 @@
#include "net/third_party/uri_template/uri_template.h"
#include "url/gurl.h"
#if defined(OS_WIN)
#include "base/enterprise_util.h"
#endif
namespace chrome_browser_net {
bool IsValidDohTemplate(const std::string& server_template,
......@@ -47,12 +43,8 @@ bool IsValidDohTemplate(const std::string& server_template,
bool ShouldDisableDohForManaged() {
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
if (g_browser_process->browser_policy_connector()->HasMachineLevelPolicies())
return true;
#endif
#if defined(OS_WIN)
if (base::IsMachineExternallyManaged())
return true;
return g_browser_process->browser_policy_connector()
->HasMachineLevelPolicies();
#endif
return false;
}
......
......@@ -16,11 +16,11 @@ namespace chrome_browser_net {
bool IsValidDohTemplate(const std::string& server_template,
std::string* server_method);
// Returns true if there are any active machine level policies or if the machine
// is domain joined. This special logic is used to disable DoH by default for
// Desktop platforms (the enterprise policy field default_for_enterprise_users
// only applies to ChromeOS). We don't attempt enterprise detection on Android
// at this time.
// Returns true if any machine level policies. ChromeOS devices are already
// handled by the default_for_enterprise_users field on the DoH policy. We don't
// attempt enterprise detection on Android at this time. This special logic is
// to prevent enterprises from having DoH enabled by default and is necessary
// because default_for_enterprise_users only applies to ChromeOS.
bool ShouldDisableDohForManaged();
const char kDnsOverHttpsModeOff[] = "off";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment