Commit 1db339c4 authored by Min Qin's avatar Min Qin Committed by Commit Bot

make some public DownloadItemImpl method private

These methods are never called by other classes, no need to mark them public.

Bug: 
Change-Id: I453e5831d60ac2970029c16fdd3011b012120695
Reviewed-on: https://chromium-review.googlesource.com/565963Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486142}
parent 5903186b
......@@ -36,14 +36,6 @@ class CONTENT_EXPORT DownloadItemImpl
: public DownloadItem,
public DownloadDestinationObserver {
public:
enum ResumeMode {
RESUME_MODE_INVALID = 0,
RESUME_MODE_IMMEDIATE_CONTINUE,
RESUME_MODE_IMMEDIATE_RESTART,
RESUME_MODE_USER_CONTINUE,
RESUME_MODE_USER_RESTART
};
// Information about the initial request that triggers the download. Most of
// the fields are immutable after the DownloadItem is successfully created.
// However, it is possible that the url chain is changed when resuming an
......@@ -290,11 +282,6 @@ class CONTENT_EXPORT DownloadItemImpl
// All remaining public interfaces virtual to allow for DownloadItemImpl
// mocks.
// Determines the resume mode for an interrupted download. Requires
// last_reason_ to be set, but doesn't require the download to be in
// INTERRUPTED state.
virtual ResumeMode GetResumeMode() const;
// State transition operations on regular downloads --------------------------
// Start the download.
......@@ -313,9 +300,6 @@ class CONTENT_EXPORT DownloadItemImpl
// TODO(rdsmith): Unwind DownloadManagerImpl and DownloadItemImpl,
// removing these from the public interface.
// Notify observers that this item is being removed by the user.
virtual void NotifyRemoved();
virtual void OnDownloadedFileRemoved();
// Provide a weak pointer reference to a DownloadDestinationObserver
......@@ -613,6 +597,22 @@ class CONTENT_EXPORT DownloadItemImpl
virtual void UpdateValidatorsOnResumption(
const DownloadCreateInfo& new_create_info);
// Notify observers that this item is being removed by the user.
void NotifyRemoved();
enum ResumeMode {
RESUME_MODE_INVALID = 0,
RESUME_MODE_IMMEDIATE_CONTINUE,
RESUME_MODE_IMMEDIATE_RESTART,
RESUME_MODE_USER_CONTINUE,
RESUME_MODE_USER_RESTART
};
// Determines the resume mode for an interrupted download. Requires
// last_reason_ to be set, but doesn't require the download to be in
// INTERRUPTED state.
ResumeMode GetResumeMode() const;
static DownloadState InternalToExternalState(
DownloadInternalState internal_state);
static DownloadInternalState ExternalToInternalState(
......
......@@ -117,7 +117,6 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_CONST_METHOD0(GetWebContents, WebContents*());
MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath());
MOCK_METHOD1(SetDisplayName, void(const base::FilePath&));
MOCK_METHOD0(NotifyRemoved, void());
// May be called when vlog is on.
std::string DebugString(bool verbose) const override { return std::string(); }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment