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

Unified Diff: net/url_request/url_request_intercepting_job_factory.h

Issue 2406273002: [Cronet] Test the libcronet that's shipped, not libcronet_test (Closed)
Patch Set: address two remaining comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_intercepting_job_factory.h
diff --git a/net/url_request/url_request_intercepting_job_factory.h b/net/url_request/url_request_intercepting_job_factory.h
index e4d616a3b20c1b7b11f33800bd3359278c711801..ff69d0d3aba8d00ccd619d53e44e67219c8992fa 100644
--- a/net/url_request/url_request_intercepting_job_factory.h
+++ b/net/url_request/url_request_intercepting_job_factory.h
@@ -32,9 +32,13 @@ class URLRequestInterceptor;
class NET_EXPORT URLRequestInterceptingJobFactory
: public URLRequestJobFactory {
public:
+ // Takes ownership of |job_factory| and |interceptor|.
URLRequestInterceptingJobFactory(
std::unique_ptr<URLRequestJobFactory> job_factory,
std::unique_ptr<URLRequestInterceptor> interceptor);
+ // Does not take ownership of |job_factory| and |interceptor|.
+ URLRequestInterceptingJobFactory(URLRequestJobFactory* job_factory,
mef 2016/11/16 18:45:44 This is weird and I think deserves a comment WRT w
pauljensen 2016/11/18 18:12:10 Done.
+ URLRequestInterceptor* interceptor);
~URLRequestInterceptingJobFactory() override;
// URLRequestJobFactory implementation
@@ -57,8 +61,10 @@ class NET_EXPORT URLRequestInterceptingJobFactory
bool IsSafeRedirectTarget(const GURL& location) const override;
private:
- std::unique_ptr<URLRequestJobFactory> job_factory_;
- std::unique_ptr<URLRequestInterceptor> interceptor_;
+ // |owning_| indicates if this object owns |job_factory_| and |interceptor_|.
+ bool owning_;
+ URLRequestJobFactory* job_factory_;
+ URLRequestInterceptor* interceptor_;
DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptingJobFactory);
};

Powered by Google App Engine
This is Rietveld 408576698