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

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: Latest merge 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 c45ae8084febb753c7bbe5991c0cbcbfdca5f4c3..079b11125350f0e2af8160b8ac9a22be50560f11 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -34,7 +34,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;
@@ -130,7 +129,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;
@@ -224,8 +224,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),
@@ -934,9 +935,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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_protocol_handler.h ('k') | chrome/browser/chromeos/gview_request_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698