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

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

Issue 1875463002: Remove unused fields from //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scythe-root
Patch Set: Reverting not really needed changes under //gpu. Created 4 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
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/save_package.h" 5 #include "content/browser/download/save_package.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 number_of_frames_pending_response_(0), 147 number_of_frames_pending_response_(0),
148 file_manager_(nullptr), 148 file_manager_(nullptr),
149 download_manager_(nullptr), 149 download_manager_(nullptr),
150 download_(nullptr), 150 download_(nullptr),
151 page_url_(GetUrlToBeSaved()), 151 page_url_(GetUrlToBeSaved()),
152 saved_main_file_path_(file_full_path), 152 saved_main_file_path_(file_full_path),
153 saved_main_directory_path_(directory_full_path), 153 saved_main_directory_path_(directory_full_path),
154 title_(web_contents->GetTitle()), 154 title_(web_contents->GetTitle()),
155 start_tick_(base::TimeTicks::Now()), 155 start_tick_(base::TimeTicks::Now()),
156 finished_(false), 156 finished_(false),
157 mhtml_finishing_(false),
158 user_canceled_(false), 157 user_canceled_(false),
159 disk_error_occurred_(false), 158 disk_error_occurred_(false),
160 save_type_(save_type), 159 save_type_(save_type),
161 all_save_items_count_(0), 160 all_save_items_count_(0),
162 file_name_set_(&base::FilePath::CompareLessIgnoreCase), 161 file_name_set_(&base::FilePath::CompareLessIgnoreCase),
163 wait_state_(INITIALIZE), 162 wait_state_(INITIALIZE),
164 unique_id_(GetNextSavePackageId()), 163 unique_id_(GetNextSavePackageId()),
165 wrote_to_completed_file_(false), 164 wrote_to_completed_file_(false),
166 wrote_to_failed_file_(false) { 165 wrote_to_failed_file_(false) {
167 DCHECK(page_url_.is_valid()); 166 DCHECK(page_url_.is_valid());
(...skipping 11 matching lines...) Expand all
179 SavePackage::SavePackage(WebContents* web_contents) 178 SavePackage::SavePackage(WebContents* web_contents)
180 : WebContentsObserver(web_contents), 179 : WebContentsObserver(web_contents),
181 number_of_frames_pending_response_(0), 180 number_of_frames_pending_response_(0),
182 file_manager_(nullptr), 181 file_manager_(nullptr),
183 download_manager_(nullptr), 182 download_manager_(nullptr),
184 download_(nullptr), 183 download_(nullptr),
185 page_url_(GetUrlToBeSaved()), 184 page_url_(GetUrlToBeSaved()),
186 title_(web_contents->GetTitle()), 185 title_(web_contents->GetTitle()),
187 start_tick_(base::TimeTicks::Now()), 186 start_tick_(base::TimeTicks::Now()),
188 finished_(false), 187 finished_(false),
189 mhtml_finishing_(false),
190 user_canceled_(false), 188 user_canceled_(false),
191 disk_error_occurred_(false), 189 disk_error_occurred_(false),
192 save_type_(SAVE_PAGE_TYPE_UNKNOWN), 190 save_type_(SAVE_PAGE_TYPE_UNKNOWN),
193 all_save_items_count_(0), 191 all_save_items_count_(0),
194 file_name_set_(&base::FilePath::CompareLessIgnoreCase), 192 file_name_set_(&base::FilePath::CompareLessIgnoreCase),
195 wait_state_(INITIALIZE), 193 wait_state_(INITIALIZE),
196 unique_id_(GetNextSavePackageId()), 194 unique_id_(GetNextSavePackageId()),
197 wrote_to_completed_file_(false), 195 wrote_to_completed_file_(false),
198 wrote_to_failed_file_(false) { 196 wrote_to_failed_file_(false) {
199 DCHECK(page_url_.is_valid()); 197 DCHECK(page_url_.is_valid());
200 InternalInit(); 198 InternalInit();
201 } 199 }
202 200
203 // This is for testing use. Set |finished_| as true because we don't want 201 // This is for testing use. Set |finished_| as true because we don't want
204 // method Cancel to be be called in destructor in test mode. 202 // method Cancel to be be called in destructor in test mode.
205 // We also don't call InternalInit(). 203 // We also don't call InternalInit().
206 SavePackage::SavePackage(WebContents* web_contents, 204 SavePackage::SavePackage(WebContents* web_contents,
207 const base::FilePath& file_full_path, 205 const base::FilePath& file_full_path,
208 const base::FilePath& directory_full_path) 206 const base::FilePath& directory_full_path)
209 : WebContentsObserver(web_contents), 207 : WebContentsObserver(web_contents),
210 number_of_frames_pending_response_(0), 208 number_of_frames_pending_response_(0),
211 file_manager_(nullptr), 209 file_manager_(nullptr),
212 download_manager_(nullptr), 210 download_manager_(nullptr),
213 download_(nullptr), 211 download_(nullptr),
214 saved_main_file_path_(file_full_path), 212 saved_main_file_path_(file_full_path),
215 saved_main_directory_path_(directory_full_path), 213 saved_main_directory_path_(directory_full_path),
216 start_tick_(base::TimeTicks::Now()), 214 start_tick_(base::TimeTicks::Now()),
217 finished_(true), 215 finished_(true),
218 mhtml_finishing_(false),
219 user_canceled_(false), 216 user_canceled_(false),
220 disk_error_occurred_(false), 217 disk_error_occurred_(false),
221 save_type_(SAVE_PAGE_TYPE_UNKNOWN), 218 save_type_(SAVE_PAGE_TYPE_UNKNOWN),
222 all_save_items_count_(0), 219 all_save_items_count_(0),
223 file_name_set_(&base::FilePath::CompareLessIgnoreCase), 220 file_name_set_(&base::FilePath::CompareLessIgnoreCase),
224 wait_state_(INITIALIZE), 221 wait_state_(INITIALIZE),
225 unique_id_(GetNextSavePackageId()), 222 unique_id_(GetNextSavePackageId()),
226 wrote_to_completed_file_(false), 223 wrote_to_completed_file_(false),
227 wrote_to_failed_file_(false) {} 224 wrote_to_failed_file_(false) {}
228 225
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 } 1493 }
1497 1494
1498 void SavePackage::FinalizeDownloadEntry() { 1495 void SavePackage::FinalizeDownloadEntry() {
1499 DCHECK(download_); 1496 DCHECK(download_);
1500 1497
1501 download_manager_->OnSavePackageSuccessfullyFinished(download_); 1498 download_manager_->OnSavePackageSuccessfullyFinished(download_);
1502 StopObservation(); 1499 StopObservation();
1503 } 1500 }
1504 1501
1505 } // namespace content 1502 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_package.h ('k') | content/browser/fileapi/sandbox_file_system_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698