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

Side by Side Diff: net/proxy/proxy_resolver_winhttp.cc

Issue 2817043: Reduce the copying of string data between C++ and javascript in proxy_resolver_v8.cc. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix comment typo 'converts' Created 10 years, 5 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
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.h ('k') | net/proxy/proxy_script_fetcher.h » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/proxy/proxy_resolver_winhttp.h" 5 #include "net/proxy/proxy_resolver_winhttp.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <winhttp.h> 8 #include <winhttp.h>
9 9
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 FreeInfo(&info); 134 FreeInfo(&info);
135 return rv; 135 return rv;
136 } 136 }
137 137
138 void ProxyResolverWinHttp::CancelRequest(RequestHandle request) { 138 void ProxyResolverWinHttp::CancelRequest(RequestHandle request) {
139 // This is a synchronous ProxyResolver; no possibility for async requests. 139 // This is a synchronous ProxyResolver; no possibility for async requests.
140 NOTREACHED(); 140 NOTREACHED();
141 } 141 }
142 142
143 int ProxyResolverWinHttp::SetPacScript(const GURL& pac_url, 143 int ProxyResolverWinHttp::SetPacScript(const GURL& pac_url,
144 const std::string& /*pac_bytes*/, 144 const string16& /*pac_script*/,
145 CompletionCallback* /*callback*/) { 145 CompletionCallback* /*callback*/) {
146 pac_url_ = pac_url.is_valid() ? pac_url : GURL("http://wpad/wpad.dat"); 146 pac_url_ = pac_url.is_valid() ? pac_url : GURL("http://wpad/wpad.dat");
147 return OK; 147 return OK;
148 } 148 }
149 149
150 bool ProxyResolverWinHttp::OpenWinHttpSession() { 150 bool ProxyResolverWinHttp::OpenWinHttpSession() {
151 DCHECK(!session_handle_); 151 DCHECK(!session_handle_);
152 session_handle_ = WinHttpOpen(NULL, 152 session_handle_ = WinHttpOpen(NULL,
153 WINHTTP_ACCESS_TYPE_NO_PROXY, 153 WINHTTP_ACCESS_TYPE_NO_PROXY,
154 WINHTTP_NO_PROXY_NAME, 154 WINHTTP_NO_PROXY_NAME,
(...skipping 13 matching lines...) Expand all
168 } 168 }
169 169
170 void ProxyResolverWinHttp::CloseWinHttpSession() { 170 void ProxyResolverWinHttp::CloseWinHttpSession() {
171 if (session_handle_) { 171 if (session_handle_) {
172 WinHttpCloseHandle(session_handle_); 172 WinHttpCloseHandle(session_handle_);
173 session_handle_ = NULL; 173 session_handle_ = NULL;
174 } 174 }
175 } 175 }
176 176
177 } // namespace net 177 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.h ('k') | net/proxy/proxy_script_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698