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

Unified Diff: chrome/browser/net/url_request_slow_http_job.cc

Issue 271066: Use FilePath in URLRequestMocks. (Closed)
Patch Set: Created 11 years, 2 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
Index: chrome/browser/net/url_request_slow_http_job.cc
diff --git a/chrome/browser/net/url_request_slow_http_job.cc b/chrome/browser/net/url_request_slow_http_job.cc
index 02a3b2bfda640572d90caa13dcfbb16a4c114a00..2ae0f132b97b000bf443be79ad821ec1c338bd08 100644
--- a/chrome/browser/net/url_request_slow_http_job.cc
+++ b/chrome/browser/net/url_request_slow_http_job.cc
@@ -11,7 +11,7 @@
static const char kMockHostname[] = "mock.slow.http";
-std::wstring URLRequestSlowHTTPJob::base_path_ = L"";
+FilePath URLRequestSlowHTTPJob::base_path_;
// static
const int URLRequestSlowHTTPJob::kDelayMs = 1000;
@@ -26,7 +26,7 @@ URLRequestJob* URLRequestSlowHTTPJob::Factory(URLRequest* request,
}
/* static */
-void URLRequestSlowHTTPJob::AddUrlHandler(const std::wstring& base_path) {
+void URLRequestSlowHTTPJob::AddUrlHandler(const FilePath& base_path) {
base_path_ = base_path;
// Add kMockHostname to URLRequestFilter.
@@ -36,11 +36,11 @@ void URLRequestSlowHTTPJob::AddUrlHandler(const std::wstring& base_path) {
}
/* static */
-GURL URLRequestSlowHTTPJob::GetMockUrl(const std::wstring& path) {
+GURL URLRequestSlowHTTPJob::GetMockUrl(const FilePath& path) {
std::string url = "http://";
url.append(kMockHostname);
url.append("/");
- url.append(WideToUTF8(path));
+ url.append(WideToUTF8(path.ToWStringHack()));
return GURL(url);
}

Powered by Google App Engine
This is Rietveld 408576698