Chromium Code Reviews| Index: components/component_updater/test/url_request_post_interceptor.h |
| diff --git a/components/component_updater/test/url_request_post_interceptor.h b/components/component_updater/test/url_request_post_interceptor.h |
| index 5699d0768be08f721f272ce13a3b2ca7eab1e39b..709fabecbc6008e641c7b33ec4b55f1e402b90fd 100644 |
| --- a/components/component_updater/test/url_request_post_interceptor.h |
| +++ b/components/component_updater/test/url_request_post_interceptor.h |
| @@ -12,11 +12,13 @@ |
| #include <vector> |
| #include "base/basictypes.h" |
| +#include "base/memory/ref_counted.h" |
| #include "base/synchronization/lock.h" |
| #include "url/gurl.h" |
| namespace base { |
| class FilePath; |
| +class SequencedTaskRunner; |
| } |
| namespace net { |
| @@ -92,11 +94,14 @@ class URLRequestPostInterceptor { |
| friend class URLRequestPostInterceptorFactory; |
| typedef std::pair<const RequestMatcher*, std::string> Expectation; |
| - explicit URLRequestPostInterceptor(const GURL& url); |
| + explicit URLRequestPostInterceptor( |
|
Sorin Jianu
2014/08/27 17:36:02
In general, explicit is used for one param ctor in
tommycli
2014/08/27 17:59:22
Done.
|
| + const GURL& url, |
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
| ~URLRequestPostInterceptor(); |
| void ClearExpectations(); |
| const GURL url_; |
| + scoped_refptr<base::SequencedTaskRunner> io_task_runner_; |
| mutable base::Lock interceptor_lock_; |
| mutable int hit_count_; |
| @@ -108,8 +113,10 @@ class URLRequestPostInterceptor { |
| class URLRequestPostInterceptorFactory { |
| public: |
| - URLRequestPostInterceptorFactory(const std::string& scheme, |
| - const std::string& hostname); |
| + URLRequestPostInterceptorFactory( |
| + const std::string& scheme, |
| + const std::string& hostname, |
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
| ~URLRequestPostInterceptorFactory(); |
| // Creates an interceptor object for the specified url path. Returns NULL |
| @@ -120,6 +127,7 @@ class URLRequestPostInterceptorFactory { |
| private: |
| const std::string scheme_; |
| const std::string hostname_; |
| + scoped_refptr<base::SequencedTaskRunner> io_task_runner_; |
| // After creation, |delegate_| lives on the IO thread and it is owned by |
| // a URLRequestFilter after registration. A task to unregister it and |
| @@ -132,7 +140,8 @@ class URLRequestPostInterceptorFactory { |
| // Intercepts HTTP POST requests sent to "localhost2". |
| class InterceptorFactory : public URLRequestPostInterceptorFactory { |
| public: |
| - InterceptorFactory(); |
| + InterceptorFactory( |
|
Sorin Jianu
2014/08/27 17:36:02
explicit
tommycli
2014/08/27 17:59:22
Done.
|
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
| ~InterceptorFactory(); |
| URLRequestPostInterceptor* CreateInterceptor(); |