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

Side by Side Diff: net/http/http_auth_preferences.h

Issue 2826273004: Enable loading gssapi library for Chromad. (Closed)
Patch Set: Enable loading gssapi library for Chromad. Created 3 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 unified diff | Download patch
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_auth_preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_AUTH_PREFERENCES_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_PREFERENCES_H_
6 #define NET_HTTP_HTTP_AUTH_PREFERENCES_H_ 6 #define NET_HTTP_HTTP_AUTH_PREFERENCES_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 class URLSecurityManager; 19 class URLSecurityManager;
20 20
21 // Manage the preferences needed for authentication, and provide a cache of 21 // Manage the preferences needed for authentication, and provide a cache of
22 // them accessible from the IO thread. 22 // them accessible from the IO thread.
23 class NET_EXPORT HttpAuthPreferences { 23 class NET_EXPORT HttpAuthPreferences {
24 public: 24 public:
25 HttpAuthPreferences(const std::vector<std::string>& auth_schemes 25 HttpAuthPreferences(const std::vector<std::string>& auth_schemes
26 #if defined(OS_POSIX) && !defined(OS_ANDROID) 26 #if defined(OS_POSIX) && !defined(OS_ANDROID)
27 , 27 ,
28 const std::string& gssapi_library_name 28 const std::string& gssapi_library_name
29 #endif 29 #endif
30 #if defined(OS_CHROMEOS)
31 ,
32 bool allow_gssapi_library_load
33 #endif
30 ); 34 );
31 virtual ~HttpAuthPreferences(); 35 virtual ~HttpAuthPreferences();
32 36
33 virtual bool IsSupportedScheme(const std::string& scheme) const; 37 virtual bool IsSupportedScheme(const std::string& scheme) const;
34 virtual bool NegotiateDisableCnameLookup() const; 38 virtual bool NegotiateDisableCnameLookup() const;
35 virtual bool NegotiateEnablePort() const; 39 virtual bool NegotiateEnablePort() const;
36 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
37 virtual std::string AuthAndroidNegotiateAccountType() const; 41 virtual std::string AuthAndroidNegotiateAccountType() const;
38 #endif 42 #endif
39 #if defined(OS_POSIX) && !defined(OS_ANDROID) 43 #if defined(OS_POSIX) && !defined(OS_ANDROID)
40 virtual std::string GssapiLibraryName() const; 44 virtual std::string GssapiLibraryName() const;
41 #endif 45 #endif
46 #if defined(OS_CHROMEOS)
47 virtual bool AllowGssapiLibraryLoad() const;
48 #endif
42 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const; 49 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const;
43 virtual bool CanDelegate(const GURL& auth_origin) const; 50 virtual bool CanDelegate(const GURL& auth_origin) const;
44 51
45 void set_negotiate_disable_cname_lookup(bool negotiate_disable_cname_lookup) { 52 void set_negotiate_disable_cname_lookup(bool negotiate_disable_cname_lookup) {
46 negotiate_disable_cname_lookup_ = negotiate_disable_cname_lookup; 53 negotiate_disable_cname_lookup_ = negotiate_disable_cname_lookup;
47 } 54 }
48 55
49 void set_negotiate_enable_port(bool negotiate_enable_port) { 56 void set_negotiate_enable_port(bool negotiate_enable_port) {
50 negotiate_enable_port_ = negotiate_enable_port; 57 negotiate_enable_port_ = negotiate_enable_port;
51 } 58 }
(...skipping 18 matching lines...) Expand all
70 77
71 #if defined(OS_ANDROID) 78 #if defined(OS_ANDROID)
72 std::string auth_android_negotiate_account_type_; 79 std::string auth_android_negotiate_account_type_;
73 #endif 80 #endif
74 #if defined(OS_POSIX) && !defined(OS_ANDROID) 81 #if defined(OS_POSIX) && !defined(OS_ANDROID)
75 // GSSAPI library name cannot change after startup, since changing it 82 // GSSAPI library name cannot change after startup, since changing it
76 // requires unloading the existing GSSAPI library, which could cause all 83 // requires unloading the existing GSSAPI library, which could cause all
77 // sorts of problems for, for example, active Negotiate transactions. 84 // sorts of problems for, for example, active Negotiate transactions.
78 const std::string gssapi_library_name_; 85 const std::string gssapi_library_name_;
79 #endif 86 #endif
87 #if defined(OS_CHROMEOS)
88 bool allow_gssapi_library_load_;
89 #endif
80 std::unique_ptr<URLSecurityManager> security_manager_; 90 std::unique_ptr<URLSecurityManager> security_manager_;
81 DISALLOW_COPY_AND_ASSIGN(HttpAuthPreferences); 91 DISALLOW_COPY_AND_ASSIGN(HttpAuthPreferences);
82 }; 92 };
83 93
84 } // namespace net 94 } // namespace net
85 #endif // NET_HTTP_HTTP_AUTH_PREFERENCES_H_ 95 #endif // NET_HTTP_HTTP_AUTH_PREFERENCES_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_auth_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698