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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 12089102: Make most code on mac compile with enable_web_intents=0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ffff Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 44aceb860fe3111d9a1ce9915a39579e7b55e74b..6e0b31a0eb6562cefc198e2bf415dc44113f05c6 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -375,15 +375,18 @@ bool ChromeDownloadManagerDelegate::ShouldOpenDownload(
return false;
}
+#if defined(ENABLE_WEB_INTENTS)
if (ShouldOpenWithWebIntents(item)) {
OpenWithWebIntent(item);
callback.Run(true);
return false;
}
+#endif
return true;
}
+#if defined(ENABLE_WEB_INTENTS)
bool ChromeDownloadManagerDelegate::ShouldOpenWithWebIntents(
const DownloadItem* item) {
if (!web_intents::IsWebIntentsEnabledForProfile(profile_))
@@ -471,6 +474,7 @@ void ChromeDownloadManagerDelegate::OpenWithWebIntent(
DCHECK(delegate);
delegate->WebIntentDispatch(NULL, dispatcher);
}
+#endif
bool ChromeDownloadManagerDelegate::GenerateFileHash() {
#if defined(FULL_SAFE_BROWSING)
@@ -753,6 +757,7 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
suggested_path = download->GetForcedFilePath();
}
+#if defined(ENABLE_WEB_INTENTS)
// If we will open the file with a web intents dispatch,
// give it a name that will not allow the OS to open it using usual
// associated apps.
@@ -760,6 +765,7 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
download->SetDisplayName(suggested_path.BaseName());
suggested_path = suggested_path.AddExtension(kWebIntentsFileExtension);
}
+#endif
// If the download hasn't already been marked dangerous (could be
// DANGEROUS_URL), check if it is a dangerous file.

Powered by Google App Engine
This is Rietveld 408576698