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

Unified Diff: net/proxy/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/mock_proxy_resolver.h ('k') | net/proxy/proxy_resolver_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver.h
===================================================================
--- net/proxy/proxy_resolver.h (revision 51195)
+++ net/proxy/proxy_resolver.h (working copy)
@@ -5,9 +5,8 @@
#ifndef NET_PROXY_PROXY_RESOLVER_H_
#define NET_PROXY_PROXY_RESOLVER_H_
-#include <string>
-
#include "base/logging.h"
+#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "net/base/completion_callback.h"
@@ -55,14 +54,14 @@
// Sets the PAC script backend to use for this proxy resolver (by URL).
int SetPacScriptByUrl(const GURL& url, CompletionCallback* callback) {
DCHECK(!expects_pac_bytes());
- return SetPacScript(url, std::string(), callback);
+ return SetPacScript(url, string16(), callback);
}
// Sets the PAC script backend to use for this proxy resolver (by contents).
- int SetPacScriptByData(const std::string& bytes_utf8,
+ int SetPacScriptByData(const string16& script,
CompletionCallback* callback) {
DCHECK(expects_pac_bytes());
- return SetPacScript(GURL(), bytes_utf8, callback);
+ return SetPacScript(GURL(), script, callback);
}
// TODO(eroman): Make this =0.
@@ -77,12 +76,12 @@
private:
// Called to set the PAC script backend to use. If |pac_url| is invalid,
- // this is a request to use WPAD (auto detect). |bytes_utf8| may be empty if
+ // this is a request to use WPAD (auto detect). |pac_script| may be empty if
// the fetch failed, or if the fetch returned no content.
// Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies
// the result through |callback|.
virtual int SetPacScript(const GURL& pac_url,
- const std::string& bytes_utf8,
+ const string16& pac_script,
CompletionCallback* callback) = 0;
const bool expects_pac_bytes_;
« no previous file with comments | « net/proxy/mock_proxy_resolver.h ('k') | net/proxy/proxy_resolver_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698