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

Side by Side Diff: net/http/url_security_manager_win.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
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 #pragma comment(lib, "urlmon.lib") 8 #pragma comment(lib, "urlmon.lib")
9 9
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 URLSecurityManagerWin::URLSecurityManagerWin( 46 URLSecurityManagerWin::URLSecurityManagerWin(
47 const HttpAuthFilter* whitelist_delegate) 47 const HttpAuthFilter* whitelist_delegate)
48 : whitelist_delegate_(whitelist_delegate) { 48 : whitelist_delegate_(whitelist_delegate) {
49 } 49 }
50 50
51 bool URLSecurityManagerWin::CanUseDefaultCredentials( 51 bool URLSecurityManagerWin::CanUseDefaultCredentials(
52 const GURL& auth_origin) const { 52 const GURL& auth_origin) const {
53 if (!const_cast<URLSecurityManagerWin*>(this)->EnsureSystemSecurityManager()) 53 if (!const_cast<URLSecurityManagerWin*>(this)->EnsureSystemSecurityManager())
54 return false; 54 return false;
55 55
56 std::wstring url_w = ASCIIToWide(auth_origin.spec()); 56 std::wstring url_w = base::ASCIIToWide(auth_origin.spec());
57 DWORD policy = 0; 57 DWORD policy = 0;
58 HRESULT hr; 58 HRESULT hr;
59 hr = security_manager_->ProcessUrlAction(url_w.c_str(), 59 hr = security_manager_->ProcessUrlAction(url_w.c_str(),
60 URLACTION_CREDENTIALS_USE, 60 URLACTION_CREDENTIALS_USE,
61 reinterpret_cast<BYTE*>(&policy), 61 reinterpret_cast<BYTE*>(&policy),
62 sizeof(policy), NULL, 0, 62 sizeof(policy), NULL, 0,
63 PUAF_NOUI, 0); 63 PUAF_NOUI, 0);
64 if (FAILED(hr)) { 64 if (FAILED(hr)) {
65 LOG(ERROR) << "IInternetSecurityManager::ProcessUrlAction failed: " << hr; 65 LOG(ERROR) << "IInternetSecurityManager::ProcessUrlAction failed: " << hr;
66 return false; 66 return false;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const HttpAuthFilter* whitelist_default, 128 const HttpAuthFilter* whitelist_default,
129 const HttpAuthFilter* whitelist_delegate) { 129 const HttpAuthFilter* whitelist_delegate) {
130 // If we have a whitelist, just use that. 130 // If we have a whitelist, just use that.
131 if (whitelist_default) 131 if (whitelist_default)
132 return new URLSecurityManagerWhitelist(whitelist_default, 132 return new URLSecurityManagerWhitelist(whitelist_default,
133 whitelist_delegate); 133 whitelist_delegate);
134 return new URLSecurityManagerWin(whitelist_delegate); 134 return new URLSecurityManagerWin(whitelist_delegate);
135 } 135 }
136 136
137 } // namespace net 137 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_unittest.cc ('k') | net/proxy/mock_proxy_script_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698