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

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

Issue 7966016: Fix lack of initialization for delegate delayed complete flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix suppressions that should be fixed by this test. Created 9 years, 3 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 | « chrome/test/functional/PYAUTO_TESTS ('k') | 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) 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 "content/browser/download/download_item.h" 5 #include "content/browser/download/download_item.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/case_conversion.h" 10 #include "base/i18n/case_conversion.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 download_manager_(download_manager), 176 download_manager_(download_manager),
177 is_paused_(false), 177 is_paused_(false),
178 open_when_complete_(false), 178 open_when_complete_(false),
179 file_externally_removed_(false), 179 file_externally_removed_(false),
180 safety_state_(SAFE), 180 safety_state_(SAFE),
181 auto_opened_(false), 181 auto_opened_(false),
182 is_otr_(is_otr), 182 is_otr_(is_otr),
183 is_temporary_(!info.save_info.file_path.empty()), 183 is_temporary_(!info.save_info.file_path.empty()),
184 all_data_saved_(false), 184 all_data_saved_(false),
185 opened_(false), 185 opened_(false),
186 open_enabled_(true) { 186 open_enabled_(true),
187 delegate_delayed_complete_(false) {
187 Init(true /* actively downloading */); 188 Init(true /* actively downloading */);
188 } 189 }
189 190
190 // Constructing for the "Save Page As..." feature: 191 // Constructing for the "Save Page As..." feature:
191 DownloadItem::DownloadItem(DownloadManager* download_manager, 192 DownloadItem::DownloadItem(DownloadManager* download_manager,
192 const FilePath& path, 193 const FilePath& path,
193 const GURL& url, 194 const GURL& url,
194 bool is_otr, 195 bool is_otr,
195 int download_id) 196 int download_id)
196 : download_id_(download_id), 197 : download_id_(download_id),
(...skipping 10 matching lines...) Expand all
207 download_manager_(download_manager), 208 download_manager_(download_manager),
208 is_paused_(false), 209 is_paused_(false),
209 open_when_complete_(false), 210 open_when_complete_(false),
210 file_externally_removed_(false), 211 file_externally_removed_(false),
211 safety_state_(SAFE), 212 safety_state_(SAFE),
212 auto_opened_(false), 213 auto_opened_(false),
213 is_otr_(is_otr), 214 is_otr_(is_otr),
214 is_temporary_(false), 215 is_temporary_(false),
215 all_data_saved_(false), 216 all_data_saved_(false),
216 opened_(false), 217 opened_(false),
217 open_enabled_(true) { 218 open_enabled_(true),
219 delegate_delayed_complete_(false) {
218 Init(true /* actively downloading */); 220 Init(true /* actively downloading */);
219 } 221 }
220 222
221 DownloadItem::~DownloadItem() { 223 DownloadItem::~DownloadItem() {
222 // TODO(rdsmith): Change to DCHECK after http://crbug.com/85408 resolved. 224 // TODO(rdsmith): Change to DCHECK after http://crbug.com/85408 resolved.
223 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 225 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
224 226
225 TransitionTo(REMOVING); 227 TransitionTo(REMOVING);
226 download_manager_->AssertQueueStateConsistent(this); 228 download_manager_->AssertQueueStateConsistent(this);
227 } 229 }
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 state_info_.target_name.value().c_str(), 795 state_info_.target_name.value().c_str(),
794 full_path().value().c_str()); 796 full_path().value().c_str());
795 } else { 797 } else {
796 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); 798 description += base::StringPrintf(" url = \"%s\"", url_list.c_str());
797 } 799 }
798 800
799 description += " }"; 801 description += " }";
800 802
801 return description; 803 return description;
802 } 804 }
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698