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

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

Issue 197043005: original change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix other build error Created 6 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
« no previous file with comments | « net/test/spawned_test_server/spawner_communicator.cc ('k') | net/url_request/url_request.h » ('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_fetcher_core.h" 5 #include "net/url_request/url_fetcher_core.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // run after the URLFetcher was already stopped. 500 // run after the URLFetcher was already stopped.
501 return; 501 return;
502 } 502 }
503 503
504 DCHECK(request_context_getter_.get()); 504 DCHECK(request_context_getter_.get());
505 DCHECK(!request_.get()); 505 DCHECK(!request_.get());
506 506
507 g_registry.Get().AddURLFetcherCore(this); 507 g_registry.Get().AddURLFetcherCore(this);
508 current_response_bytes_ = 0; 508 current_response_bytes_ = 0;
509 request_ = request_context_getter_->GetURLRequestContext()->CreateRequest( 509 request_ = request_context_getter_->GetURLRequestContext()->CreateRequest(
510 original_url_, DEFAULT_PRIORITY, this); 510 original_url_, DEFAULT_PRIORITY, this, NULL);
511 request_->set_stack_trace(stack_trace_); 511 request_->set_stack_trace(stack_trace_);
512 int flags = request_->load_flags() | load_flags_; 512 int flags = request_->load_flags() | load_flags_;
513 if (!g_interception_enabled) 513 if (!g_interception_enabled)
514 flags = flags | LOAD_DISABLE_INTERCEPT; 514 flags = flags | LOAD_DISABLE_INTERCEPT;
515 515
516 if (is_chunked_upload_) 516 if (is_chunked_upload_)
517 request_->EnableChunkedUpload(); 517 request_->EnableChunkedUpload();
518 request_->SetLoadFlags(flags); 518 request_->SetLoadFlags(flags);
519 request_->SetReferrer(referrer_); 519 request_->SetReferrer(referrer_);
520 request_->set_referrer_policy(referrer_policy_); 520 request_->set_referrer_policy(referrer_policy_);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 } 890 }
891 891
892 void URLFetcherCore::InformDelegateDownloadProgressInDelegateThread( 892 void URLFetcherCore::InformDelegateDownloadProgressInDelegateThread(
893 int64 current, int64 total) { 893 int64 current, int64 total) {
894 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); 894 DCHECK(delegate_task_runner_->BelongsToCurrentThread());
895 if (delegate_) 895 if (delegate_)
896 delegate_->OnURLFetchDownloadProgress(fetcher_, current, total); 896 delegate_->OnURLFetchDownloadProgress(fetcher_, current, total);
897 } 897 }
898 898
899 } // namespace net 899 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/spawner_communicator.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698