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

Side by Side Diff: content/browser/download/download_manager_impl.cc

Issue 1203983004: Stop using SpawnedTestServer in DownloadContentTest.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 "content/browser/download/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 "Range", 94 "Range",
95 base::StringPrintf("bytes=%" PRId64 "-", params->offset()), 95 base::StringPrintf("bytes=%" PRId64 "-", params->offset()),
96 true); 96 true);
97 97
98 if (has_last_modified) { 98 if (has_last_modified) {
99 request->SetExtraRequestHeaderByName("If-Unmodified-Since", 99 request->SetExtraRequestHeaderByName("If-Unmodified-Since",
100 params->last_modified(), 100 params->last_modified(),
101 true); 101 true);
102 } 102 }
103 if (has_etag) { 103 if (has_etag) {
104 request->SetExtraRequestHeaderByName("If-Match", params->etag(), true); 104 request->SetExtraRequestHeaderByName("If-Range", params->etag(), true);
Randy Smith (Not in Mondays) 2015/11/12 00:57:57 a-r nit: Should this be in this CL? It looks like
asanka 2015/11/13 21:40:01 I'll make another CL and make this CL depend on th
105 } 105 }
106 } 106 }
107 107
108 for (DownloadUrlParameters::RequestHeadersType::const_iterator iter 108 for (DownloadUrlParameters::RequestHeadersType::const_iterator iter
109 = params->request_headers_begin(); 109 = params->request_headers_begin();
110 iter != params->request_headers_end(); 110 iter != params->request_headers_end();
111 ++iter) { 111 ++iter) {
112 request->SetExtraRequestHeaderByName( 112 request->SetExtraRequestHeaderByName(
113 iter->first, iter->second, false /*overwrite*/); 113 iter->first, iter->second, false /*overwrite*/);
114 } 114 }
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 if (delegate_) 749 if (delegate_)
750 delegate_->OpenDownload(download); 750 delegate_->OpenDownload(download);
751 } 751 }
752 752
753 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 753 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
754 if (delegate_) 754 if (delegate_)
755 delegate_->ShowDownloadInShell(download); 755 delegate_->ShowDownloadInShell(download);
756 } 756 }
757 757
758 } // namespace content 758 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698