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

Unified Diff: net/base/network_delegate.cc

Issue 38303002: Enable Mojo to download from file URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« no previous file with comments | « net/base/network_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_delegate.cc
diff --git a/net/base/network_delegate.cc b/net/base/network_delegate.cc
index 5a69b863e62ef8394d9e646fbc102aea7d8f47bc..834769c84e170b73dadc30735964eb465772ff3e 100644
--- a/net/base/network_delegate.cc
+++ b/net/base/network_delegate.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "net/base/load_flags.h"
+#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
namespace net {
@@ -92,6 +93,21 @@ NetworkDelegate::AuthRequiredResponse NetworkDelegate::NotifyAuthRequired(
return OnAuthRequired(request, auth_info, callback, credentials);
}
+int NetworkDelegate::NotifyBeforeSocketStreamConnect(
+ SocketStream* socket,
+ const CompletionCallback& callback) {
+ DCHECK(CalledOnValidThread());
+ DCHECK(socket);
+ DCHECK(!callback.is_null());
+ return OnBeforeSocketStreamConnect(socket, callback);
+}
+
+void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request,
+ RequestWaitState state) {
+ DCHECK(CalledOnValidThread());
+ OnRequestWaitStateChange(request, state);
+}
+
bool NetworkDelegate::CanGetCookies(const URLRequest& request,
const CookieList& cookie_list) {
DCHECK(CalledOnValidThread());
@@ -125,26 +141,93 @@ bool NetworkDelegate::CanEnablePrivacyMode(
return OnCanEnablePrivacyMode(url, first_party_for_cookies);
}
+int NetworkDelegate::OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) {
+ return OK;
+}
+
+int NetworkDelegate::OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) {
+ return OK;
+}
+
+void NetworkDelegate::OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) {
+}
+
+int NetworkDelegate::OnHeadersReceived(
+ URLRequest* request,
+ const CompletionCallback& callback,
+ const HttpResponseHeaders* original_response_headers,
+ scoped_refptr<HttpResponseHeaders>* override_response_headers) {
+ return OK;
+}
+
+void NetworkDelegate::OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) {
+}
+
+void NetworkDelegate::OnResponseStarted(URLRequest* request) {
+}
+
+void NetworkDelegate::OnRawBytesRead(const URLRequest& request,
+ int bytes_read) {
+}
+
+void NetworkDelegate::OnCompleted(URLRequest* request, bool started) {
+}
+
+void NetworkDelegate::OnURLRequestDestroyed(URLRequest* request) {
+}
+
+void NetworkDelegate::OnPACScriptError(int line_number,
+ const base::string16& error) {
+}
+
+NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired(
+ URLRequest* request,
+ const AuthChallengeInfo& auth_info,
+ const AuthCallback& callback,
+ AuthCredentials* credentials) {
+ return AUTH_REQUIRED_RESPONSE_NO_ACTION;
+}
+
+bool NetworkDelegate::OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) {
+ return true;
+}
+
+bool NetworkDelegate::OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) {
+ return true;
+}
+
+bool NetworkDelegate::OnCanAccessFile(const URLRequest& request,
+ const base::FilePath& path) const {
+ return false;
+}
+
+bool NetworkDelegate::OnCanThrottleRequest(const URLRequest& request) const {
+ return false;
+}
+
bool NetworkDelegate::OnCanEnablePrivacyMode(
const GURL& url,
const GURL& first_party_for_cookies) const {
- // Default implementation disables privacy mode.
return false;
}
-int NetworkDelegate::NotifyBeforeSocketStreamConnect(
+int NetworkDelegate::OnBeforeSocketStreamConnect(
SocketStream* socket,
const CompletionCallback& callback) {
- DCHECK(CalledOnValidThread());
- DCHECK(socket);
- DCHECK(!callback.is_null());
- return OnBeforeSocketStreamConnect(socket, callback);
+ return OK;
}
-void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request,
- RequestWaitState state) {
- DCHECK(CalledOnValidThread());
- OnRequestWaitStateChange(request, state);
+void NetworkDelegate::OnRequestWaitStateChange(const URLRequest& request,
+ RequestWaitState state) {
}
} // namespace net
« no previous file with comments | « net/base/network_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698