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

Unified Diff: net/url_request/url_request.cc

Issue 10830124: Removed checks that verify URLRequest has a Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « chrome/browser/automation/url_request_automation_job.cc ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 8ea6325d819e072b5ad455b4c68867c90b7fa131..8fb16224a86727cc227d48b7b7f3f8f2d83c5c4e 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -610,7 +610,7 @@ void URLRequest::NotifyResponseStarted() {
// In some cases (e.g. an event was canceled), we might have sent the
// completion event and receive a NotifyResponseStarted() later.
if (!has_notified_completion_ && status_.is_success()) {
- if (context_ && context_->network_delegate())
+ if (context_->network_delegate())
context_->network_delegate()->NotifyResponseStarted(this);
}
@@ -694,7 +694,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
NetLog::StringCallback("location", &location.possibly_invalid_spec()));
}
- if (context_ && context_->network_delegate())
+ if (context_->network_delegate())
context_->network_delegate()->NotifyBeforeRedirect(this, location);
if (redirect_limit_ <= 0) {
@@ -788,7 +788,7 @@ void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) {
NetworkDelegate::AuthRequiredResponse rv =
NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
auth_info_ = auth_info;
- if (context_ && context_->network_delegate()) {
+ if (context_->network_delegate()) {
rv = context_->network_delegate()->NotifyAuthRequired(
this,
*auth_info,
@@ -855,7 +855,7 @@ void URLRequest::NotifySSLCertificateError(const SSLInfo& ssl_info,
bool URLRequest::CanGetCookies(const CookieList& cookie_list) const {
DCHECK(!(load_flags_ & LOAD_DO_NOT_SEND_COOKIES));
- if (context_ && context_->network_delegate()) {
+ if (context_->network_delegate()) {
return context_->network_delegate()->CanGetCookies(*this,
cookie_list);
}
@@ -865,7 +865,7 @@ bool URLRequest::CanGetCookies(const CookieList& cookie_list) const {
bool URLRequest::CanSetCookie(const std::string& cookie_line,
CookieOptions* options) const {
DCHECK(!(load_flags_ & LOAD_DO_NOT_SAVE_COOKIES));
- if (context_ && context_->network_delegate()) {
+ if (context_->network_delegate()) {
return context_->network_delegate()->CanSetCookie(*this,
cookie_line,
options);
@@ -893,7 +893,7 @@ void URLRequest::NotifyRequestCompleted() {
is_pending_ = false;
has_notified_completion_ = true;
- if (context_ && context_->network_delegate())
+ if (context_->network_delegate())
context_->network_delegate()->NotifyCompleted(this, job_ != NULL);
}
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.cc ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698