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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 7523042: Add a status message "Waiting for extension Foo..." when there's a request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 345
346 void URLRequestHttpJob::StartTransaction() { 346 void URLRequestHttpJob::StartTransaction() {
347 if (request_->context() && request_->context()->network_delegate()) { 347 if (request_->context() && request_->context()->network_delegate()) {
348 int rv = request_->context()->network_delegate()->NotifyBeforeSendHeaders( 348 int rv = request_->context()->network_delegate()->NotifyBeforeSendHeaders(
349 request_, &notify_before_headers_sent_callback_, 349 request_, &notify_before_headers_sent_callback_,
350 &request_info_.extra_headers); 350 &request_info_.extra_headers);
351 // If an extension blocks the request, we rely on the callback to 351 // If an extension blocks the request, we rely on the callback to
352 // StartTransactionInternal(). 352 // StartTransactionInternal().
353 if (rv == ERR_IO_PENDING) { 353 if (rv == ERR_IO_PENDING) {
354 request_->net_log().BeginEvent( 354 request_->SetBlockedOnDelegate();
355 NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
356 return; 355 return;
357 } 356 }
358 } 357 }
359 StartTransactionInternal(); 358 StartTransactionInternal();
360 } 359 }
361 360
362 void URLRequestHttpJob::NotifyBeforeSendHeadersCallback(int result) { 361 void URLRequestHttpJob::NotifyBeforeSendHeadersCallback(int result) {
363 request_->net_log().EndEvent( 362 request_->SetUnblockedOnDelegate();
364 NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
365 363
366 if (result == OK) { 364 if (result == OK) {
367 StartTransactionInternal(); 365 StartTransactionInternal();
368 } else { 366 } else {
369 request_->net_log().AddEvent(NetLog::TYPE_CANCELLED, 367 request_->net_log().AddEvent(NetLog::TYPE_CANCELLED,
370 make_scoped_refptr(new NetLogStringParameter("source", "delegate"))); 368 make_scoped_refptr(new NetLogStringParameter("source", "delegate")));
371 NotifyCanceled(); 369 NotifyCanceled();
372 } 370 }
373 } 371 }
374 372
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 if (done_) 1561 if (done_)
1564 return; 1562 return;
1565 done_ = true; 1563 done_ = true;
1566 1564
1567 RecordPerfHistograms(reason); 1565 RecordPerfHistograms(reason);
1568 if (reason == FINISHED) 1566 if (reason == FINISHED)
1569 RecordCompressionHistograms(); 1567 RecordCompressionHistograms();
1570 } 1568 }
1571 1569
1572 } // namespace net 1570 } // namespace net
OLDNEW
« net/url_request/url_request.h ('K') | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698