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

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

Issue 6698009: Add request_id to HttpRequestInfo and pass it to the NetworkDelegate for events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fixes Created 9 years, 9 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/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 DCHECK(!transaction_.get()); 717 DCHECK(!transaction_.get());
718 718
719 // Ensure that we do not send username and password fields in the referrer. 719 // Ensure that we do not send username and password fields in the referrer.
720 GURL referrer(request_->GetSanitizedReferrer()); 720 GURL referrer(request_->GetSanitizedReferrer());
721 721
722 request_info_.url = request_->url(); 722 request_info_.url = request_->url();
723 request_info_.referrer = referrer; 723 request_info_.referrer = referrer;
724 request_info_.method = request_->method(); 724 request_info_.method = request_->method();
725 request_info_.load_flags = request_->load_flags(); 725 request_info_.load_flags = request_->load_flags();
726 request_info_.priority = request_->priority(); 726 request_info_.priority = request_->priority();
727 request_info_.request_id = request_->identifier();
727 728
728 if (request_->context()) { 729 if (request_->context()) {
729 request_info_.extra_headers.SetHeaderIfMissing( 730 request_info_.extra_headers.SetHeaderIfMissing(
730 HttpRequestHeaders::kUserAgent, 731 HttpRequestHeaders::kUserAgent,
731 request_->context()->GetUserAgent(request_->url())); 732 request_->context()->GetUserAgent(request_->url()));
732 } 733 }
733 734
734 AddExtraHeaders(); 735 AddExtraHeaders();
735 AddCookieHeaderAndStart(); 736 AddCookieHeaderAndStart();
736 } 737 }
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 } 1319 }
1319 1320
1320 bool URLRequestHttpJob::IsCompressibleContent() const { 1321 bool URLRequestHttpJob::IsCompressibleContent() const {
1321 std::string mime_type; 1322 std::string mime_type;
1322 return GetMimeType(&mime_type) && 1323 return GetMimeType(&mime_type) &&
1323 (IsSupportedJavascriptMimeType(mime_type.c_str()) || 1324 (IsSupportedJavascriptMimeType(mime_type.c_str()) ||
1324 IsSupportedNonImageMimeType(mime_type.c_str())); 1325 IsSupportedNonImageMimeType(mime_type.c_str()));
1325 } 1326 }
1326 1327
1327 } // namespace net 1328 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698