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

Side by Side Diff: chrome/browser/android/download/download_overwrite_infobar_delegate.h

Issue 580043002: [Android] Prompt with infobar on filename conflict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoided Java-only infobar Created 5 years, 10 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_H_
7
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "chrome/browser/download/download_target_determiner_delegate.h"
11 #include "components/infobars/core/infobar_delegate.h"
12
13 class InfoBarService;
14
15 namespace chrome {
16 namespace android {
17
18 // An infobar that asks if it is ok to overwrite an
19 // existing file. Due to limited disk space on Android, two options are
20 // presented to the user when downloading a file whose name conflicts with an
21 // already present file:
22 //
23 // 1. Overwrite the file.
24 // 2. Create a new file.
25 //
26 // Also, the user can dismiss the infobar to abort the download.
27 //
28 // Note that this infobar does not expire if the user subsequently navigates,
29 // since such navigations won't automatically cancel the underlying download.
30 class DownloadOverwriteInfoBarDelegate : public infobars::InfoBarDelegate {
31 public:
32 // This is called when the user chooses to overwrite the existing file.
33 virtual void OverwriteExistingFile() = 0;
34
35 // This is called when the user chooses to create a new file.
36 virtual void CreateNewFile() = 0;
37
38 // Get the file name to be downloaded.
39 virtual std::string GetFileName() const = 0;
Peter Kasting 2015/02/25 06:24:57 This should be a single FilePath accessor (which s
Changwan Ryu 2015/03/02 14:46:36 Hmm... Since these values are from Java side in th
40 // Get the download directory name.
41 virtual std::string GetDirName() const = 0;
42 // Get the full directory path.
43 virtual std::string GetDirFullPath() const = 0;
44 };
45
46 } // namespace android
47 } // namespace chrome
48
49 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698