Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #544 from brave/lint
Browse files Browse the repository at this point in the history
Lint fix
  • Loading branch information
bridiver authored Mar 29, 2018
2 parents 628e7a6 + 47040da commit 677557f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions atom/browser/atom_download_manager_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ namespace {
const DownloadPathReservationTracker::FilenameConflictAction
kDefaultPlatformConflictAction = DownloadPathReservationTracker::UNIQUIFY;

NativeWindow* GetNativeWindowFromWebContents(content::WebContents* web_contents) {
NativeWindow*
GetNativeWindowFromWebContents(content::WebContents* web_contents) {
DCHECK(web_contents);
auto relay = NativeWindowRelay::FromWebContents(web_contents);
return relay ? relay->window.get() : nullptr;
Expand Down Expand Up @@ -154,16 +155,16 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
NativeWindow* window = nullptr;
if (content::WebContents* web_contents = item->GetWebContents()) {
window = GetNativeWindowFromWebContents(web_contents);
// TODO(): If we want to use WebContents internally for file download, we
// should revisit here. If that happens with single tab, browser is
// TODO(ltilve): If we want to use WebContents internally for file download,
// we should revisit here. If that happens with single tab, browser is
// closed.
CloseWebContentsIfNeeded(web_contents);
}

// If we can't find proper |window| for showing save dialog, cancel
// and cleanup current download.
// TODO(): If we want to use WebContents internaly for download, we should
// revisit here. Currently, we cancel it.
// TODO(ltilve): If we want to use WebContents internaly for download,
// we should revisit here. Currently, we cancel it.
if (!window) {
item->Remove();
base::FilePath path;
Expand Down

0 comments on commit 677557f

Please sign in to comment.