OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "net/http/url_security_manager.h" | 5 #include "net/http/url_security_manager.h" |
6 | 6 |
7 #include <urlmon.h> | 7 #include <urlmon.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // TODO(wtc): we should fail the authentication. | 96 // TODO(wtc): we should fail the authentication. |
97 return false; | 97 return false; |
98 default: | 98 default: |
99 NOTREACHED(); | 99 NOTREACHED(); |
100 return false; | 100 return false; |
101 } | 101 } |
102 } | 102 } |
103 // TODO(cbentzel): Could CanDelegate use the security zone as well? | 103 // TODO(cbentzel): Could CanDelegate use the security zone as well? |
104 | 104 |
105 bool URLSecurityManagerWin::EnsureSystemSecurityManager() { | 105 bool URLSecurityManagerWin::EnsureSystemSecurityManager() { |
106 if (!security_manager_.get()) { | 106 if (!security_manager_.Get()) { |
107 HRESULT hr = CoInternetCreateSecurityManager(NULL, | 107 HRESULT hr = CoInternetCreateSecurityManager(NULL, |
108 security_manager_.Receive(), | 108 security_manager_.Receive(), |
109 NULL); | 109 NULL); |
110 if (FAILED(hr) || !security_manager_.get()) { | 110 if (FAILED(hr) || !security_manager_.Get()) { |
111 LOG(ERROR) << "Unable to create the Windows Security Manager instance"; | 111 LOG(ERROR) << "Unable to create the Windows Security Manager instance"; |
112 return false; | 112 return false; |
113 } | 113 } |
114 } | 114 } |
115 return true; | 115 return true; |
116 } | 116 } |
117 | 117 |
118 // static | 118 // static |
119 URLSecurityManager* URLSecurityManager::Create() { | 119 URLSecurityManager* URLSecurityManager::Create() { |
120 return new URLSecurityManagerWin; | 120 return new URLSecurityManagerWin; |
121 } | 121 } |
122 | 122 |
123 } // namespace net | 123 } // namespace net |
OLD | NEW |