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

Side by Side Diff: chrome/browser/net/url_request_mock_net_error_job.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A net::URLRequestJob class that simulates network errors (including https 5 // A net::URLRequestJob class that simulates network errors (including https
6 // related). 6 // related).
7 // It is based on URLRequestMockHttpJob. 7 // It is based on URLRequestMockHttpJob.
8 8
9 #ifndef CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_ 9 #ifndef CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
10 #define CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_ 10 #define CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
(...skipping 20 matching lines...) Expand all
31 // contents and http-headers should be retrieved from. 31 // contents and http-headers should be retrieved from.
32 static void AddMockedURL(const GURL& url, 32 static void AddMockedURL(const GURL& url,
33 const std::wstring& base, 33 const std::wstring& base,
34 const std::vector<int>& errors, 34 const std::vector<int>& errors,
35 net::X509Certificate* ssl_cert); 35 net::X509Certificate* ssl_cert);
36 36
37 // Removes the specified |url| from the list of mocked urls. 37 // Removes the specified |url| from the list of mocked urls.
38 static void RemoveMockedURL(const GURL& url); 38 static void RemoveMockedURL(const GURL& url);
39 39
40 private: 40 private:
41 ~URLRequestMockNetErrorJob(); 41 virtual ~URLRequestMockNetErrorJob();
42 42
43 static net::URLRequest::ProtocolFactory Factory; 43 static net::URLRequest::ProtocolFactory Factory;
44 44
45 void StartAsync(); 45 void StartAsync();
46 46
47 // The errors to simulate. 47 // The errors to simulate.
48 std::vector<int> errors_; 48 std::vector<int> errors_;
49 49
50 // The certificate to use for SSL errors. 50 // The certificate to use for SSL errors.
51 scoped_refptr<net::X509Certificate> ssl_cert_; 51 scoped_refptr<net::X509Certificate> ssl_cert_;
52 52
53 struct MockInfo; 53 struct MockInfo;
54 typedef std::map<GURL, MockInfo> URLMockInfoMap; 54 typedef std::map<GURL, MockInfo> URLMockInfoMap;
55 static URLMockInfoMap url_mock_info_map_; 55 static URLMockInfoMap url_mock_info_map_;
56 56
57 ScopedRunnableMethodFactory<URLRequestMockNetErrorJob> method_factory_; 57 ScopedRunnableMethodFactory<URLRequestMockNetErrorJob> method_factory_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(URLRequestMockNetErrorJob); 59 DISALLOW_COPY_AND_ASSIGN(URLRequestMockNetErrorJob);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_ 62 #endif // CHROME_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/url_request_mock_link_doctor_job.h ('k') | chrome/browser/net/url_request_slow_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698