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

Unified Diff: net/proxy/single_threaded_proxy_resolver.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, 6 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
« no previous file with comments | « net/proxy/single_threaded_proxy_resolver.h ('k') | net/proxy/single_threaded_proxy_resolver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/single_threaded_proxy_resolver.cc
===================================================================
--- net/proxy/single_threaded_proxy_resolver.cc (revision 51195)
+++ net/proxy/single_threaded_proxy_resolver.cc (working copy)
@@ -35,11 +35,11 @@
public:
SetPacScriptTask(SingleThreadedProxyResolver* coordinator,
const GURL& pac_url,
- const std::string& pac_bytes,
+ const string16& pac_script,
CompletionCallback* callback)
: coordinator_(coordinator),
callback_(callback),
- pac_bytes_(pac_bytes),
+ pac_script_(pac_script),
pac_url_(pac_url),
origin_loop_(MessageLoop::current()) {
DCHECK(callback);
@@ -71,7 +71,7 @@
// Runs on the worker thread.
void DoRequest(ProxyResolver* resolver) {
int rv = resolver->expects_pac_bytes() ?
- resolver->SetPacScriptByData(pac_bytes_, NULL) :
+ resolver->SetPacScriptByData(pac_script_, NULL) :
resolver->SetPacScriptByUrl(pac_url_, NULL);
DCHECK_NE(rv, ERR_IO_PENDING);
@@ -92,7 +92,7 @@
// Must only be used on the "origin" thread.
SingleThreadedProxyResolver* coordinator_;
CompletionCallback* callback_;
- std::string pac_bytes_;
+ string16 pac_script_;
GURL pac_url_;
// Usable from within DoQuery on the worker thread.
@@ -300,13 +300,13 @@
int SingleThreadedProxyResolver::SetPacScript(
const GURL& pac_url,
- const std::string& pac_bytes,
+ const string16& pac_script,
CompletionCallback* callback) {
EnsureThreadStarted();
DCHECK(!outstanding_set_pac_script_task_);
SetPacScriptTask* task = new SetPacScriptTask(
- this, pac_url, pac_bytes, callback);
+ this, pac_url, pac_script, callback);
outstanding_set_pac_script_task_ = task;
task->Start();
return ERR_IO_PENDING;
« no previous file with comments | « net/proxy/single_threaded_proxy_resolver.h ('k') | net/proxy/single_threaded_proxy_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698