diff options
author | shalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 19:07:33 +0000 |
---|---|---|
committer | shalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 19:07:33 +0000 |
commit | 180aad7c121d6ad743e639769fc1b6c39b5ad5b5 (patch) | |
tree | 46fea45392cb5f06f0665d853e29638774c37568 | |
parent | bd3699e4b9341e8084defefae72284aa36ddcedd (diff) | |
download | chromium_src-180aad7c121d6ad743e639769fc1b6c39b5ad5b5.zip chromium_src-180aad7c121d6ad743e639769fc1b6c39b5ad5b5.tar.gz chromium_src-180aad7c121d6ad743e639769fc1b6c39b5ad5b5.tar.bz2 |
Decouple URLRequestJob from URLRequestContext; access NetworkDelegate as a contructor parameter.
Note: this depends on
http://codereview.chromium.org/10559036/
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10534100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144948 0039d316-1c4b-4281-b951-d872f2087c98
27 files changed, 74 insertions, 43 deletions
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc index 5d2df14..126863e 100644 --- a/chrome/browser/automation/url_request_automation_job.cc +++ b/chrome/browser/automation/url_request_automation_job.cc @@ -20,6 +20,7 @@ #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" +#include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" using base::Time; @@ -55,7 +56,7 @@ URLRequestAutomationJob::URLRequestAutomationJob( int request_id, AutomationResourceMessageFilter* filter, bool is_pending) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), id_(0), tab_(tab), message_filter_(filter), diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index 48e0a65..1685eeb 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc @@ -44,6 +44,8 @@ #include "content/test/net/url_request_failed_job.h" #include "content/test/net/url_request_mock_http_job.h" #include "net/base/net_errors.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_filter.h" #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_status.h" @@ -216,7 +218,7 @@ void URLRequestTimeoutOnDemandJob::AbandonJobs(int expected_num_jobs) { URLRequestTimeoutOnDemandJob::URLRequestTimeoutOnDemandJob( net::URLRequest* request) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), next_job_(NULL) { } diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc index a52ef03..ac409aa 100644 --- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc +++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc @@ -34,6 +34,7 @@ #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_job.h" using content::BrowserThread; @@ -222,7 +223,7 @@ class GDataURLRequestJob : public net::URLRequestJob { }; GDataURLRequestJob::GDataURLRequestJob(net::URLRequest* request) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST( new base::WeakPtrFactory<GDataURLRequestJob>(this))), file_system_(NULL), diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc index 1d580fd..6e6216e 100644 --- a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc +++ b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc @@ -31,6 +31,7 @@ #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_file_job.h" #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job_factory.h" @@ -223,7 +224,7 @@ class URLRequestChromeJob : public net::URLRequestJob, URLRequestChromeJob::URLRequestChromeJob(net::URLRequest* request, ChromeURLDataManagerBackend* backend) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), data_offset_(0), pending_buf_size_(0), allow_caching_(true), diff --git a/content/browser/net/view_http_cache_job_factory.cc b/content/browser/net/view_http_cache_job_factory.cc index 738524f..dddb9ba 100644 --- a/content/browser/net/view_http_cache_job_factory.cc +++ b/content/browser/net/view_http_cache_job_factory.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,7 +25,7 @@ namespace { class ViewHttpCacheJob : public net::URLRequestJob { public: explicit ViewHttpCacheJob(net::URLRequest* request) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), core_(new Core), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), ALLOW_THIS_IN_INITIALIZER_LIST( diff --git a/content/test/net/url_request_abort_on_end_job.cc b/content/test/net/url_request_abort_on_end_job.cc index 4cb729f..8216220 100644 --- a/content/test/net/url_request_abort_on_end_job.cc +++ b/content/test/net/url_request_abort_on_end_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This class simulates what wininet does when a dns lookup fails. @@ -13,6 +13,8 @@ #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_filter.h" #include "net/url_request/url_request_status.h" @@ -57,7 +59,8 @@ void URLRequestAbortOnEndJob::GetResponseInfoConst( } URLRequestAbortOnEndJob::URLRequestAbortOnEndJob(net::URLRequest* request) - : URLRequestJob(request), sent_data_(false), + : URLRequestJob(request, request->context()->network_delegate()), + sent_data_(false), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { } diff --git a/content/test/net/url_request_failed_job.cc b/content/test/net/url_request_failed_job.cc index 9ea08b8..a9efd18 100644 --- a/content/test/net/url_request_failed_job.cc +++ b/content/test/net/url_request_failed_job.cc @@ -10,6 +10,7 @@ #include "base/string_number_conversions.h" #include "net/base/net_errors.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_filter.h" namespace { @@ -42,7 +43,7 @@ GURL GetMockUrl(const std::string& scheme, int net_error) { URLRequestFailedJob::URLRequestFailedJob(net::URLRequest* request, int net_error) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), net_error_(net_error), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {} diff --git a/content/test/net/url_request_slow_download_job.cc b/content/test/net/url_request_slow_download_job.cc index 0af0441..5fc435d 100644 --- a/content/test/net/url_request_slow_download_job.cc +++ b/content/test/net/url_request_slow_download_job.cc @@ -15,6 +15,7 @@ #include "net/base/io_buffer.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_filter.h" using content::BrowserThread; @@ -79,7 +80,7 @@ void URLRequestSlowDownloadJob::FinishPendingRequests() { } URLRequestSlowDownloadJob::URLRequestSlowDownloadJob(net::URLRequest* request) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), bytes_already_sent_(0), should_finish_download_(false), buffer_size_(0), diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index 915cd58..51c627a 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -411,7 +411,7 @@ void URLRequest::Start() { response_info_.request_time = Time::Now(); // Only notify the delegate for the initial request. - if (context_ && context_->network_delegate()) { + if (context_->network_delegate()) { int error = context_->network_delegate()->NotifyBeforeURLRequest( this, before_request_callback_, &delegate_redirect_url_); if (error == net::ERR_IO_PENDING) { diff --git a/net/url_request/url_request_about_job.cc b/net/url_request/url_request_about_job.cc index f305909..d96f2d4 100644 --- a/net/url_request/url_request_about_job.cc +++ b/net/url_request/url_request_about_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,11 +11,13 @@ #include "base/bind.h" #include "base/compiler_specific.h" #include "base/message_loop.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" namespace net { URLRequestAboutJob::URLRequestAboutJob(URLRequest* request) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { } diff --git a/net/url_request/url_request_error_job.cc b/net/url_request/url_request_error_job.cc index 4924c01..c3dc95e 100644 --- a/net/url_request/url_request_error_job.cc +++ b/net/url_request/url_request_error_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,12 +8,14 @@ #include "base/compiler_specific.h" #include "base/message_loop.h" #include "net/base/net_errors.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_status.h" namespace net { URLRequestErrorJob::URLRequestErrorJob(URLRequest* request, int error) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), error_(error), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {} diff --git a/net/url_request/url_request_file_dir_job.cc b/net/url_request/url_request_file_dir_job.cc index 0b05cbb..796cbf9 100644 --- a/net/url_request/url_request_file_dir_job.cc +++ b/net/url_request/url_request_file_dir_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,6 +16,7 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #if defined(OS_POSIX) #include <sys/stat.h> @@ -25,7 +26,7 @@ namespace net { URLRequestFileDirJob::URLRequestFileDirJob(URLRequest* request, const FilePath& dir_path) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), ALLOW_THIS_IN_INITIALIZER_LIST(lister_(dir_path, this)), dir_path_(dir_path), canceled_(false), diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc index 0b64f74..ce0cc8b 100644 --- a/net/url_request/url_request_file_job.cc +++ b/net/url_request/url_request_file_job.cc @@ -85,7 +85,7 @@ class URLRequestFileJob::AsyncResolver URLRequestFileJob::URLRequestFileJob(URLRequest* request, const FilePath& file_path) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), file_path_(file_path), stream_(NULL), is_directory_(false), diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc index 63dcc86..aca1b48 100644 --- a/net/url_request/url_request_ftp_job.cc +++ b/net/url_request/url_request_ftp_job.cc @@ -20,7 +20,7 @@ namespace net { URLRequestFtpJob::URLRequestFtpJob(URLRequest* request) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), read_in_progress_(false), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { } diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 4300d11..bf01635 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -148,7 +148,7 @@ URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request, URLRequestHttpJob::URLRequestHttpJob(URLRequest* request) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), response_info_(NULL), response_cookies_save_index_(0), proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH), diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index 255e90d..91dc5ba 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc @@ -17,11 +17,11 @@ #include "net/base/network_delegate.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" -#include "net/url_request/url_request_context.h" namespace net { -URLRequestJob::URLRequestJob(URLRequest* request) +URLRequestJob::URLRequestJob(URLRequest* request, + NetworkDelegate* network_delegate) : request_(request), done_(false), prefilter_bytes_read_(0), @@ -32,6 +32,7 @@ URLRequestJob::URLRequestJob(URLRequest* request) has_handled_response_(false), expected_content_size_(-1), deferred_redirect_status_code_(-1), + network_delegate_(network_delegate), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { base::SystemMonitor* system_monitor = base::SystemMonitor::Get(); if (system_monitor) @@ -692,9 +693,8 @@ void URLRequestJob::RecordBytesRead(int bytes_read) { << " pre total = " << prefilter_bytes_read_ << " post total = " << postfilter_bytes_read_; UpdatePacketReadTimes(); // Facilitate stats recording if it is active. - const URLRequestContext* context = request_->context(); - if (context && context->network_delegate()) - context->network_delegate()->NotifyRawBytesRead(*request_, bytes_read); + if (network_delegate_) + network_delegate_->NotifyRawBytesRead(*request_, bytes_read); } bool URLRequestJob::FilterHasData() { diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index cf98447..41015a8 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,7 +13,6 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/system_monitor/system_monitor.h" -#include "base/time.h" #include "googleurl/src/gurl.h" #include "net/base/filter.h" #include "net/base/host_port_pair.h" @@ -29,6 +28,7 @@ class CookieOptions; class HttpRequestHeaders; class HttpResponseInfo; class IOBuffer; +class NetworkDelegate; class SSLCertRequestInfo; class SSLInfo; class URLRequest; @@ -39,7 +39,8 @@ class X509Certificate; class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, public base::SystemMonitor::PowerObserver { public: - explicit URLRequestJob(URLRequest* request); + explicit URLRequestJob(URLRequest* request, + NetworkDelegate* network_delegate); // Returns the request that owns this job. THIS POINTER MAY BE NULL if the // request was destroyed. @@ -372,6 +373,8 @@ class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, GURL deferred_redirect_url_; int deferred_redirect_status_code_; + NetworkDelegate* network_delegate_; + base::WeakPtrFactory<URLRequestJob> weak_factory_; DISALLOW_COPY_AND_ASSIGN(URLRequestJob); diff --git a/net/url_request/url_request_job_factory_unittest.cc b/net/url_request/url_request_job_factory_unittest.cc index bbb3703..a87c717 100644 --- a/net/url_request/url_request_job_factory_unittest.cc +++ b/net/url_request/url_request_job_factory_unittest.cc @@ -6,6 +6,8 @@ #include "base/bind.h" #include "base/memory/weak_ptr.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,7 +19,7 @@ namespace { class MockURLRequestJob : public URLRequestJob { public: MockURLRequestJob(URLRequest* request, const URLRequestStatus& status) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), status_(status), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {} diff --git a/net/url_request/url_request_redirect_job.cc b/net/url_request/url_request_redirect_job.cc index 01b2559..9960ea6 100644 --- a/net/url_request/url_request_redirect_job.cc +++ b/net/url_request/url_request_redirect_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,12 +7,14 @@ #include "base/bind.h" #include "base/compiler_specific.h" #include "base/message_loop.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" namespace net { URLRequestRedirectJob::URLRequestRedirectJob(URLRequest* request, const GURL& redirect_destination) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), redirect_destination_(redirect_destination), http_status_code_(302), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {} diff --git a/net/url_request/url_request_simple_job.cc b/net/url_request/url_request_simple_job.cc index 538dcf1..1b81351 100644 --- a/net/url_request/url_request_simple_job.cc +++ b/net/url_request/url_request_simple_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,12 +9,14 @@ #include "base/message_loop.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_status.h" namespace net { URLRequestSimpleJob::URLRequestSimpleJob(URLRequest* request) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), data_offset_(0), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {} diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc index 94a6bf5..9ec31fc 100644 --- a/net/url_request/url_request_test_job.cc +++ b/net/url_request/url_request_test_job.cc @@ -16,6 +16,7 @@ #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" namespace net { @@ -85,7 +86,7 @@ URLRequestJob* URLRequestTestJob::Factory(URLRequest* request, } URLRequestTestJob::URLRequestTestJob(URLRequest* request) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), auto_advance_(false), stage_(WAITING), offset_(0), @@ -96,7 +97,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request) URLRequestTestJob::URLRequestTestJob(URLRequest* request, bool auto_advance) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), auto_advance_(auto_advance), stage_(WAITING), offset_(0), @@ -109,7 +110,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request, const std::string& response_headers, const std::string& response_data, bool auto_advance) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), auto_advance_(auto_advance), stage_(WAITING), response_headers_(new HttpResponseHeaders(response_headers)), diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc index 5e6e928..d537212 100644 --- a/webkit/appcache/appcache_request_handler_unittest.cc +++ b/webkit/appcache/appcache_request_handler_unittest.cc @@ -75,12 +75,13 @@ class AppCacheRequestHandlerTest : public testing::Test { public: MockURLRequestJob(net::URLRequest* request, int response_code) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), response_code_(response_code), has_response_info_(false) {} MockURLRequestJob(net::URLRequest* request, const net::HttpResponseInfo& info) - : net::URLRequestJob(request), + : net::URLRequestJob(request, + request->context()->network_delegate()), response_code_(info.headers->response_code()), has_response_info_(true), response_info_(info) {} diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc index 3ca1bdf..2c8efa7 100644 --- a/webkit/appcache/appcache_url_request_job.cc +++ b/webkit/appcache/appcache_url_request_job.cc @@ -18,6 +18,7 @@ #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_status.h" #include "webkit/appcache/appcache_service.h" @@ -25,7 +26,8 @@ namespace appcache { AppCacheURLRequestJob::AppCacheURLRequestJob( net::URLRequest* request, AppCacheStorage* storage) - : net::URLRequestJob(request), storage_(storage), + : net::URLRequestJob(request, request->context()->network_delegate()), + storage_(storage), has_been_started_(false), has_been_killed_(false), delivery_type_(AWAITING_DELIVERY_ORDERS), group_id_(0), cache_id_(kNoCacheId), is_fallback_(false), diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc index 2fda6b5..80e382b 100644 --- a/webkit/blob/blob_url_request_job.cc +++ b/webkit/blob/blob_url_request_job.cc @@ -18,6 +18,7 @@ #include "net/http/http_response_info.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_error_job.h" #include "net/url_request/url_request_status.h" #include "webkit/blob/local_file_stream_reader.h" @@ -49,7 +50,7 @@ BlobURLRequestJob::BlobURLRequestJob( net::URLRequest* request, BlobData* blob_data, base::MessageLoopProxy* file_thread_proxy) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), blob_data_(blob_data), file_thread_proxy_(file_thread_proxy), diff --git a/webkit/fileapi/file_system_dir_url_request_job.cc b/webkit/fileapi/file_system_dir_url_request_job.cc index 75859a5..182f1a9 100644 --- a/webkit/fileapi/file_system_dir_url_request_job.cc +++ b/webkit/fileapi/file_system_dir_url_request_job.cc @@ -20,6 +20,7 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_url.h" @@ -32,7 +33,7 @@ namespace fileapi { FileSystemDirURLRequestJob::FileSystemDirURLRequestJob( URLRequest* request, FileSystemContext* file_system_context) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), file_system_context_(file_system_context), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { } diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc index 9837100..ea3aaf2 100644 --- a/webkit/fileapi/file_system_url_request_job.cc +++ b/webkit/fileapi/file_system_url_request_job.cc @@ -26,6 +26,7 @@ #include "net/http/http_response_info.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_context.h" #include "webkit/blob/file_stream_reader.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" @@ -55,7 +56,7 @@ static net::HttpResponseHeaders* CreateHttpResponseHeaders() { FileSystemURLRequestJob::FileSystemURLRequestJob( URLRequest* request, FileSystemContext* file_system_context) - : URLRequestJob(request), + : URLRequestJob(request, request->context()->network_delegate()), file_system_context_(file_system_context), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), is_directory_(false), diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc index daafbfc..8758d2b 100644 --- a/webkit/fileapi/file_writer_delegate_unittest.cc +++ b/webkit/fileapi/file_writer_delegate_unittest.cc @@ -144,7 +144,7 @@ class FileWriterDelegateTestJob : public net::URLRequestJob { public: FileWriterDelegateTestJob(net::URLRequest* request, const std::string& content) - : net::URLRequestJob(request), + : net::URLRequestJob(request, request->context()->network_delegate()), content_(content), remaining_bytes_(content.length()), cursor_(0) { |