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

Unified Diff: chrome/browser/extensions/autoupdate_interceptor.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/extensions/autoupdate_interceptor.cc
diff --git a/chrome/browser/extensions/autoupdate_interceptor.cc b/chrome/browser/extensions/autoupdate_interceptor.cc
index 34e01b6995e55288f888d170bcfe6e53ec11781d..febc9cf5f19b458cc14ef626fbdf11a75472bc91 100644
--- a/chrome/browser/extensions/autoupdate_interceptor.cc
+++ b/chrome/browser/extensions/autoupdate_interceptor.cc
@@ -8,6 +8,7 @@
#include "base/file_util.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_thread.h"
+#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_job.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,8 +22,10 @@ namespace extensions {
class AutoUpdateTestRequestJob : public net::URLRequestTestJob {
public:
AutoUpdateTestRequestJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
const std::string& response_data)
: net::URLRequestTestJob(request,
+ network_delegate,
net::URLRequestTestJob::test_headers(),
response_data,
true) {
@@ -44,7 +47,7 @@ AutoUpdateInterceptor::~AutoUpdateInterceptor() {
}
net::URLRequestJob* AutoUpdateInterceptor::MaybeIntercept(
- net::URLRequest* request) {
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request->url().scheme() != "http" ||
request->url().host() != "localhost") {
@@ -69,7 +72,7 @@ net::URLRequestJob* AutoUpdateInterceptor::MaybeIntercept(
std::string contents;
EXPECT_TRUE(file_util::ReadFileToString(i->second, &contents));
- return new AutoUpdateTestRequestJob(request, contents);
+ return new AutoUpdateTestRequestJob(request, network_delegate, contents);
}
« no previous file with comments | « chrome/browser/extensions/autoupdate_interceptor.h ('k') | chrome/browser/extensions/extension_protocols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698