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

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

Issue 2806423002: Fixed an uninitialized value (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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 "content/browser/download/download_request_core.h" 5 #include "content/browser/download/download_request_core.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 DownloadRequestData::Attach(request.get(), params, download_id); 178 DownloadRequestData::Attach(request.get(), params, download_id);
179 return request; 179 return request;
180 } 180 }
181 181
182 DownloadRequestCore::DownloadRequestCore(net::URLRequest* request, 182 DownloadRequestCore::DownloadRequestCore(net::URLRequest* request,
183 Delegate* delegate) 183 Delegate* delegate)
184 : delegate_(delegate), 184 : delegate_(delegate),
185 request_(request), 185 request_(request),
186 download_id_(DownloadItem::kInvalidId), 186 download_id_(DownloadItem::kInvalidId),
187 transient_(false),
187 bytes_read_(0), 188 bytes_read_(0),
188 pause_count_(0), 189 pause_count_(0),
189 was_deferred_(false), 190 was_deferred_(false),
190 is_partial_request_(false), 191 is_partial_request_(false),
191 started_(false), 192 started_(false),
192 abort_reason_(DOWNLOAD_INTERRUPT_REASON_NONE) { 193 abort_reason_(DOWNLOAD_INTERRUPT_REASON_NONE) {
193 DCHECK(request_); 194 DCHECK(request_);
194 DCHECK(delegate_); 195 DCHECK(delegate_);
195 RecordDownloadCount(UNTHROTTLED_COUNT); 196 RecordDownloadCount(UNTHROTTLED_COUNT);
196 power_save_blocker_.reset(new device::PowerSaveBlocker( 197 power_save_blocker_.reset(new device::PowerSaveBlocker(
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // old servers that didn't implement "If-Match" and must be ignored when 675 // old servers that didn't implement "If-Match" and must be ignored when
675 // "If-Match" presents. 676 // "If-Match" presents.
676 if (has_last_modified) { 677 if (has_last_modified) {
677 request->SetExtraRequestHeaderByName( 678 request->SetExtraRequestHeaderByName(
678 net::HttpRequestHeaders::kIfUnmodifiedSince, params->last_modified(), 679 net::HttpRequestHeaders::kIfUnmodifiedSince, params->last_modified(),
679 true); 680 true);
680 } 681 }
681 } 682 }
682 683
683 } // namespace content 684 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698