Commit 07618d51 authored by noelutz@google.com's avatar noelutz@google.com

Update the windows UI to support displaying a warning after the

download has started.
Review URL: http://codereview.chromium.org/8587042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110750 0039d316-1c4b-4281-b951-d872f2087c98
parent 5a183b3b
......@@ -158,6 +158,9 @@ class DownloadItemView : public views::ButtonListener,
// Reverts from dangerous mode to normal download mode.
void ClearDangerousMode();
// Start displaying the dangerous download warning.
void EnterDangerousMode();
// Sets |size| with the size of the Save and Discard buttons (they have the
// same size).
gfx::Size GetButtonSize();
......
......@@ -42,11 +42,13 @@ DownloadStateInfo::DownloadStateInfo(
}
bool DownloadStateInfo::IsDangerous() const {
// TODO(noelutz): At this point we can't mark the download as dangerous
// if it's content is dangerous because the UI doesn't yet support it.
// Once the UI has been changed we should return true when the danger
// type is set to DANGEROUS_CONTENT.
// |dangerous_content| is true.
// TODO(noelutz): At this point only the windows views UI supports
// warnings based on dangerous content.
#ifdef OS_WIN
return (danger == DANGEROUS_FILE ||
danger == DANGEROUS_URL);
danger == DANGEROUS_URL ||
danger == DANGEROUS_CONTENT);
#else
return (danger == DANGEROUS_FILE || danger == DANGEROUS_URL);
#endif
}
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