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

Side by Side Diff: net/url_request/url_request_test_util.h

Issue 51953002: [Net] Add a priority parameter to URLRequest's constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 1 month 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
« no previous file with comments | « net/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/message_loop/message_loop_proxy.h" 16 #include "base/message_loop/message_loop_proxy.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
23 #include "net/base/load_timing_info.h" 23 #include "net/base/load_timing_info.h"
24 #include "net/base/net_errors.h" 24 #include "net/base/net_errors.h"
25 #include "net/base/network_delegate.h" 25 #include "net/base/network_delegate.h"
26 #include "net/base/request_priority.h"
26 #include "net/cert/cert_verifier.h" 27 #include "net/cert/cert_verifier.h"
27 #include "net/cookies/cookie_monster.h" 28 #include "net/cookies/cookie_monster.h"
28 #include "net/disk_cache/disk_cache.h" 29 #include "net/disk_cache/disk_cache.h"
29 #include "net/ftp/ftp_network_layer.h" 30 #include "net/ftp/ftp_network_layer.h"
30 #include "net/http/http_auth_handler_factory.h" 31 #include "net/http/http_auth_handler_factory.h"
31 #include "net/http/http_cache.h" 32 #include "net/http/http_cache.h"
32 #include "net/http/http_network_layer.h" 33 #include "net/http/http_network_layer.h"
33 #include "net/http/http_request_headers.h" 34 #include "net/http/http_request_headers.h"
34 #include "net/proxy/proxy_service.h" 35 #include "net/proxy/proxy_service.h"
35 #include "net/ssl/ssl_config_service_defaults.h" 36 #include "net/ssl/ssl_config_service_defaults.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 private: 102 private:
102 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 103 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
103 scoped_ptr<TestURLRequestContext> context_; 104 scoped_ptr<TestURLRequestContext> context_;
104 }; 105 };
105 106
106 //----------------------------------------------------------------------------- 107 //-----------------------------------------------------------------------------
107 108
108 class TestURLRequest : public URLRequest { 109 class TestURLRequest : public URLRequest {
109 public: 110 public:
110 TestURLRequest( 111 TestURLRequest(const GURL& url,
111 const GURL& url, Delegate* delegate, 112 RequestPriority priority,
112 TestURLRequestContext* context, NetworkDelegate* network_delegate); 113 Delegate* delegate,
114 TestURLRequestContext* context);
113 virtual ~TestURLRequest(); 115 virtual ~TestURLRequest();
114 }; 116 };
115 117
116 //----------------------------------------------------------------------------- 118 //-----------------------------------------------------------------------------
117 119
118 class TestDelegate : public URLRequest::Delegate { 120 class TestDelegate : public URLRequest::Delegate {
119 public: 121 public:
120 TestDelegate(); 122 TestDelegate();
121 virtual ~TestDelegate(); 123 virtual ~TestDelegate();
122 124
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 NetworkDelegate* network_delegate) const OVERRIDE; 346 NetworkDelegate* network_delegate) const OVERRIDE;
345 void set_main_intercept_job(URLRequestJob* job); 347 void set_main_intercept_job(URLRequestJob* job);
346 348
347 private: 349 private:
348 mutable URLRequestJob* main_intercept_job_; 350 mutable URLRequestJob* main_intercept_job_;
349 }; 351 };
350 352
351 } // namespace net 353 } // namespace net
352 354
353 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 355 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_unittest.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698