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

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

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // instance WebCore::FrameLoader::HideReferrer. 344 // instance WebCore::FrameLoader::HideReferrer.
345 if (referrer.is_valid()) { 345 if (referrer.is_valid()) {
346 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, 346 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
347 referrer.spec()); 347 referrer.spec());
348 } 348 }
349 349
350 request_info_.extra_headers.SetHeaderIfMissing( 350 request_info_.extra_headers.SetHeaderIfMissing(
351 HttpRequestHeaders::kUserAgent, 351 HttpRequestHeaders::kUserAgent,
352 http_user_agent_settings_ ? 352 http_user_agent_settings_ ?
353 http_user_agent_settings_->GetUserAgent(request_->url()) : 353 http_user_agent_settings_->GetUserAgent(request_->url()) :
354 EmptyString()); 354 std::string());
355 355
356 AddExtraHeaders(); 356 AddExtraHeaders();
357 AddCookieHeaderAndStart(); 357 AddCookieHeaderAndStart();
358 } 358 }
359 359
360 void URLRequestHttpJob::Kill() { 360 void URLRequestHttpJob::Kill() {
361 http_transaction_delegate_->OnDetachRequest(); 361 http_transaction_delegate_->OnDetachRequest();
362 362
363 if (!transaction_.get()) 363 if (!transaction_.get())
364 return; 364 return;
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 1517
1518 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1518 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1519 awaiting_callback_ = false; 1519 awaiting_callback_ = false;
1520 } 1520 }
1521 1521
1522 void URLRequestHttpJob::OnDetachRequest() { 1522 void URLRequestHttpJob::OnDetachRequest() {
1523 http_transaction_delegate_->OnDetachRequest(); 1523 http_transaction_delegate_->OnDetachRequest();
1524 } 1524 }
1525 1525
1526 } // namespace net 1526 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698