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

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

Issue 2737723002: Downloads : Last access time update for NTP, duplicate infobar and notifications (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_
7 7
8 #include "components/infobars/core/confirm_infobar_delegate.h" 8 #include "components/infobars/core/confirm_infobar_delegate.h"
9 9
10 namespace chrome { 10 namespace chrome {
11 namespace android { 11 namespace android {
12 12
13 // An infobar that asks if user wants to continue downloading when there is 13 // An infobar that asks if user wants to continue downloading when there is
14 // already a duplicate file in storage. If user chooses to proceed, 14 // already a duplicate file in storage. If user chooses to proceed,
15 // a new file will be created. 15 // a new file will be created.
16 // Note that this infobar does not expire if the user subsequently navigates, 16 // Note that this infobar does not expire if the user subsequently navigates,
17 // since such navigations won't automatically cancel the underlying download. 17 // since such navigations won't automatically cancel the underlying download.
18 class DuplicateDownloadInfoBarDelegate : public ConfirmInfoBarDelegate { 18 class DuplicateDownloadInfoBarDelegate : public ConfirmInfoBarDelegate {
19 public: 19 public:
20 // Gets the file path to be downloaded. 20 // Gets the file path to be downloaded.
21 virtual std::string GetFilePath() const = 0; 21 virtual std::string GetFilePath() const = 0;
22 22
23 // Whether the download is for offline page. 23 // Whether the download is for offline page.
24 virtual bool IsOfflinePage() const; 24 virtual bool IsOfflinePage() const;
25 25
26 virtual std::string GetPageURL() const; 26 virtual std::string GetPageURL() const;
27 27
28 virtual bool IsOffTheRecord() const; 28 virtual bool IsOffTheRecord() const;
29 29
30 virtual std::string GetDownloadGuid() const;
31
30 // ConfirmInfoBarDelegate implementation. 32 // ConfirmInfoBarDelegate implementation.
31 base::string16 GetMessageText() const override; 33 base::string16 GetMessageText() const override;
32 bool ShouldExpire(const NavigationDetails& details) const override; 34 bool ShouldExpire(const NavigationDetails& details) const override;
33 }; 35 };
34 36
35 } // namespace android 37 } // namespace android
36 } // namespace chrome 38 } // namespace chrome
37 39
38 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H _ 40 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698