Chromium Code Reviews| Index: net/http/http_auth_gssapi_posix.cc |
| diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc |
| index c8302353b7fc1ac263a820d7251f1a05c36b5ae3..6d86e2a515f85e1d83f397b5f567dfbdbc19528e 100644 |
| --- a/net/http/http_auth_gssapi_posix.cc |
| +++ b/net/http/http_auth_gssapi_posix.cc |
| @@ -18,6 +18,11 @@ |
| #include "net/base/net_errors.h" |
| #include "net/http/http_auth_multi_round_parse.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "chrome/browser/browser_process.h" |
|
asanka
2017/04/20 18:00:52
//net can't depend on //chrome. There are lots of
|
| +#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| +#endif |
| + |
| // These are defined for the GSSAPI library: |
| // Paraphrasing the comments from gssapi.h: |
| // "The implementation must reserve static storage for a |
| @@ -411,6 +416,15 @@ bool GSSAPISharedLibrary::Init() { |
| bool GSSAPISharedLibrary::InitImpl() { |
| DCHECK(!initialized_); |
| #if defined(DLOPEN_KERBEROS) |
| +#if defined(OS_CHROMEOS) |
| + policy::BrowserPolicyConnectorChromeOS* connector = |
| + g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| + |
| + if (!connector->IsActiveDirectoryManaged()) { |
| + return false; |
| + } |
| +#endif |
| + |
| gssapi_library_ = LoadSharedLibrary(); |
| if (gssapi_library_ == NULL) |
| return false; |