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

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

Issue 10805020: Kill DownloadItem::IsOtr() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 4 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
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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 web_contents()->GetBrowserContext(); 286 web_contents()->GetBrowserContext();
287 if (!browser_context) { 287 if (!browser_context) {
288 NOTREACHED(); 288 NOTREACHED();
289 return false; 289 return false;
290 } 290 }
291 291
292 // The download manager keeps ownership but adds us as an observer. 292 // The download manager keeps ownership but adds us as an observer.
293 download_ = download_manager_->CreateSavePackageDownloadItem( 293 download_ = download_manager_->CreateSavePackageDownloadItem(
294 saved_main_file_path_, 294 saved_main_file_path_,
295 page_url_, 295 page_url_,
296 browser_context->IsOffTheRecord(),
297 ((save_type_ == content::SAVE_PAGE_TYPE_AS_MHTML) ? 296 ((save_type_ == content::SAVE_PAGE_TYPE_AS_MHTML) ?
298 "multipart/related" : "text/html"), 297 "multipart/related" : "text/html"),
299 this); 298 this);
300 if (!download_created_callback.is_null()) 299 if (!download_created_callback.is_null())
301 download_created_callback.Run(download_); 300 download_created_callback.Run(download_);
302 301
303 // Check save type and process the save page job. 302 // Check save type and process the save page job.
304 if (save_type_ == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML) { 303 if (save_type_ == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML) {
305 // Get directory 304 // Get directory
306 DCHECK(!saved_main_directory_path_.empty()); 305 DCHECK(!saved_main_directory_path_.empty());
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 StopObservation(); 1361 StopObservation();
1363 } 1362 }
1364 1363
1365 void SavePackage::FinalizeDownloadEntry() { 1364 void SavePackage::FinalizeDownloadEntry() {
1366 DCHECK(download_); 1365 DCHECK(download_);
1367 DCHECK(download_manager_); 1366 DCHECK(download_manager_);
1368 1367
1369 download_manager_->SavePageDownloadFinished(download_); 1368 download_manager_->SavePageDownloadFinished(download_);
1370 StopObservation(); 1369 StopObservation();
1371 } 1370 }
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698