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

Unified Diff: net/proxy/mock_proxy_resolver.h

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/init_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/mock_proxy_resolver.h
===================================================================
--- net/proxy/mock_proxy_resolver.h (revision 51195)
+++ net/proxy/mock_proxy_resolver.h (working copy)
@@ -61,17 +61,17 @@
public:
SetPacScriptRequest(MockAsyncProxyResolverBase* resolver,
const GURL& pac_url,
- const std::string& pac_bytes,
+ const string16& pac_script,
CompletionCallback* callback)
: resolver_(resolver),
pac_url_(pac_url),
- pac_bytes_(pac_bytes),
+ pac_script_(pac_script),
callback_(callback),
origin_loop_(MessageLoop::current()) {
}
const GURL& pac_url() const { return pac_url_; }
- const std::string& pac_bytes() const { return pac_bytes_; }
+ const string16& pac_script() const { return pac_script_; }
void CompleteNow(int rv) {
CompletionCallback* callback = callback_;
@@ -85,7 +85,7 @@
private:
MockAsyncProxyResolverBase* resolver_;
const GURL pac_url_;
- const std::string pac_bytes_;
+ const string16 pac_script_;
CompletionCallback* callback_;
MessageLoop* origin_loop_;
};
@@ -115,11 +115,11 @@
}
virtual int SetPacScript(const GURL& pac_url,
- const std::string& pac_bytes,
+ const string16& pac_script,
CompletionCallback* callback) {
DCHECK(!pending_set_pac_script_request_.get());
pending_set_pac_script_request_.reset(
- new SetPacScriptRequest(this, pac_url, pac_bytes, callback));
+ new SetPacScriptRequest(this, pac_url, pac_script, callback));
// Finished when user calls SetPacScriptRequest::CompleteNow().
return ERR_IO_PENDING;
}
« no previous file with comments | « net/proxy/init_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698