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

Unified Diff: chrome/browser/automation/url_request_mock_net_error_job.cc

Issue 15010: Implement extension:// protocol. (Closed)
Patch Set: add missing unit test Created 12 years 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 | « chrome/browser/automation/url_request_mock_net_error_job.h ('k') | chrome/browser/browser.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/url_request_mock_net_error_job.cc
diff --git a/chrome/browser/automation/url_request_mock_net_error_job.cc b/chrome/browser/automation/url_request_mock_net_error_job.cc
index 1c67d293a454c2287c02fa77dd59a09f62c431da..c6bfa80fae955d387fd73272a30f96da8b0db4d2 100644
--- a/chrome/browser/automation/url_request_mock_net_error_job.cc
+++ b/chrome/browser/automation/url_request_mock_net_error_job.cc
@@ -46,26 +46,25 @@ URLRequestJob* URLRequestMockNetErrorJob::Factory(URLRequest* request,
DCHECK(iter != url_mock_info_map_.end());
MockInfo mock_info = iter->second;
- URLRequestMockNetErrorJob* job =
- new URLRequestMockNetErrorJob(request, mock_info.errors,
- mock_info.ssl_cert);
- // URLRequestMockNetErrorJob derives from URLRequestFileJob. We set the
- // file_path_ of the job so that the URLRequestFileJob methods will do the
- // loading from the files.
+ // URLRequestMockNetErrorJob derives from URLRequestFileJob. We pass a
+ // FilePath so that the URLRequestFileJob methods will do the loading from
+ // the files.
std::wstring file_url(L"file:///");
file_url.append(mock_info.base);
file_url.append(UTF8ToWide(url.path()));
// Convert the file:/// URL to a path on disk.
std::wstring file_path;
net::FileURLToFilePath(GURL(WideToUTF8(file_url)), &file_path);
- job->file_path_ = FilePath::FromWStringHack(file_path);
- return job;
+ return new URLRequestMockNetErrorJob(request, mock_info.errors,
+ mock_info.ssl_cert,
+ FilePath::FromWStringHack(file_path));
}
URLRequestMockNetErrorJob::URLRequestMockNetErrorJob(URLRequest* request,
- const std::vector<int>& errors, net::X509Certificate* cert)
- : URLRequestMockHTTPJob(request),
+ const std::vector<int>& errors, net::X509Certificate* cert,
+ const FilePath& file_path)
+ : URLRequestMockHTTPJob(request, file_path),
errors_(errors),
ssl_cert_(cert) {
}
« no previous file with comments | « chrome/browser/automation/url_request_mock_net_error_job.h ('k') | chrome/browser/browser.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698