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

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

Issue 3859003: FBTF: Even more ctor/virtual deinlining. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/net/url_request_mock_net_error_job.h" 5 #include "chrome/browser/net/url_request_mock_net_error_job.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/base/net_util.h" 14 #include "net/base/net_util.h"
15 #include "net/base/x509_certificate.h" 15 #include "net/base/x509_certificate.h"
16 #include "net/url_request/url_request_filter.h" 16 #include "net/url_request/url_request_filter.h"
17 17
18 // static 18 // static
19 URLRequestMockNetErrorJob::URLMockInfoMap 19 URLRequestMockNetErrorJob::URLMockInfoMap
20 URLRequestMockNetErrorJob::url_mock_info_map_; 20 URLRequestMockNetErrorJob::url_mock_info_map_;
21 21
22 struct URLRequestMockNetErrorJob::MockInfo {
23 MockInfo() : ssl_cert(NULL) { }
24 MockInfo(std::wstring base,
25 std::vector<int> errors,
26 net::X509Certificate* ssl_cert)
27 : base(base),
28 errors(errors),
29 ssl_cert(ssl_cert) { }
30
31 std::wstring base;
32 std::vector<int> errors;
33 scoped_refptr<net::X509Certificate> ssl_cert;
34 };
35
22 // static 36 // static
23 void URLRequestMockNetErrorJob::AddMockedURL(const GURL& url, 37 void URLRequestMockNetErrorJob::AddMockedURL(const GURL& url,
24 const std::wstring& base, 38 const std::wstring& base,
25 const std::vector<int>& errors, 39 const std::vector<int>& errors,
26 net::X509Certificate* ssl_cert) { 40 net::X509Certificate* ssl_cert) {
27 #ifndef NDEBUG 41 #ifndef NDEBUG
28 URLMockInfoMap::const_iterator iter = url_mock_info_map_.find(url); 42 URLMockInfoMap::const_iterator iter = url_mock_info_map_.find(url);
29 DCHECK(iter == url_mock_info_map_.end()); 43 DCHECK(iter == url_mock_info_map_.end());
30 #endif 44 #endif
31 45
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ssl_cert_.get()); 109 ssl_cert_.get());
96 } else { 110 } else {
97 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error)); 111 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error));
98 } 112 }
99 } 113 }
100 } 114 }
101 115
102 void URLRequestMockNetErrorJob::ContinueDespiteLastError() { 116 void URLRequestMockNetErrorJob::ContinueDespiteLastError() {
103 Start(); 117 Start();
104 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698