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

Unified Diff: chrome/browser/chromeos/gdata/gdata_protocol_handler.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NetworkDelegate fixed almost everywhere Created 8 years, 4 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: chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
index 519fa4bdcd5ca201b3e99e7b10b1dc4c2e43105a..db6efeb41b26a398be0a0b5afde76d3117e55ce2 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -35,7 +35,6 @@
#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;
@@ -131,7 +130,8 @@ void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) {
// formatted as drive://<resource-id>.
class GDataURLRequestJob : public net::URLRequestJob {
public:
- explicit GDataURLRequestJob(net::URLRequest* request);
+ GDataURLRequestJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate);
// net::URLRequestJob overrides:
virtual void Start() OVERRIDE;
@@ -225,8 +225,9 @@ class GDataURLRequestJob : public net::URLRequestJob {
DISALLOW_COPY_AND_ASSIGN(GDataURLRequestJob);
};
-GDataURLRequestJob::GDataURLRequestJob(net::URLRequest* request)
- : net::URLRequestJob(request, request->context()->network_delegate()),
+GDataURLRequestJob::GDataURLRequestJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate)
+ : net::URLRequestJob(request, network_delegate),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(
new base::WeakPtrFactory<GDataURLRequestJob>(this))),
file_system_(NULL),
@@ -935,9 +936,9 @@ GDataProtocolHandler::~GDataProtocolHandler() {
}
net::URLRequestJob* GDataProtocolHandler::MaybeCreateJob(
- net::URLRequest* request) const {
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
DVLOG(1) << "Handling url: " << request->url().spec();
- return new GDataURLRequestJob(request);
+ return new GDataURLRequestJob(request, network_delegate);
}
} // namespace gdata

Powered by Google App Engine
This is Rietveld 408576698