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

Unified Diff: net/http/http_auth_gssapi_posix.cc

Issue 2826273004: Enable loading gssapi library for Chromad. (Closed)
Patch Set: Created 3 years, 8 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
« net/features.gni ('K') | « net/features.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« net/features.gni ('K') | « net/features.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698