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

Unified Diff: chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: do null check on webcontents Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h
diff --git a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h
deleted file mode 100644
index 30e8bfe67dadb188ae09a100cb684020848bf050..0000000000000000000000000000000000000000
--- a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_
-#define CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_
-
-#include "base/android/scoped_java_ref.h"
-#include "base/callback.h"
-#include "base/files/file_path.h"
-#include "base/macros.h"
-#include "chrome/browser/android/download/download_overwrite_infobar_delegate.h"
-#include "chrome/browser/download/download_path_reservation_tracker.h"
-#include "chrome/browser/download/download_target_determiner_delegate.h"
-#include "components/infobars/core/infobar_delegate.h"
-#include "content/public/browser/download_item.h"
-
-using base::android::ScopedJavaGlobalRef;
-
-class InfoBarService;
-
-namespace chrome {
-namespace android {
-
-// An infobar delegate that starts from the given file path.
-class ChromeDownloadManagerOverwriteInfoBarDelegate
- : public DownloadOverwriteInfoBarDelegate,
- public content::DownloadItem::Observer {
- public:
- ~ChromeDownloadManagerOverwriteInfoBarDelegate() override;
-
- static void Create(
- InfoBarService* infobar_service,
- content::DownloadItem* download_item,
- const base::FilePath& suggested_download_path,
- const DownloadTargetDeterminerDelegate::FileSelectedCallback&
- file_selected_callback);
-
- // content::DownloadItem::Observer
- void OnDownloadDestroyed(content::DownloadItem* download_item) override;
-
- private:
- ChromeDownloadManagerOverwriteInfoBarDelegate(
- content::DownloadItem* download_item,
- const base::FilePath& suggested_path,
- const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback);
-
- // DownloadOverwriteInfoBarDelegate:
- infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
- bool OverwriteExistingFile() override;
- bool CreateNewFile() override;
- std::string GetFileName() const override;
- std::string GetDirName() const override;
- std::string GetDirFullPath() const override;
- void InfoBarDismissed() override;
-
- // The download item that is requesting the infobar. Could get deleted while
- // the infobar is showing.
- content::DownloadItem* download_item_;
-
- // The suggested download path from download target determiner. This is used
- // to show users the file name and the directory that will be used.
- base::FilePath suggested_download_path_;
-
- // A callback to download target determiner to notify that file selection
- // is made (or cancelled).
- DownloadTargetDeterminerDelegate::FileSelectedCallback
- file_selected_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerOverwriteInfoBarDelegate);
-};
-
-} // namespace android
-} // namespace chrome
-
-#endif // CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698