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

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

Issue 10452009: Improve the UI for disabling off-store extension install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments, fixed tests Created 8 years, 7 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
« no previous file with comments | « chrome/browser/download/download_crx_util.h ('k') | chrome/browser/download/download_history.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_crx_util.cc
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index 8711140c92acfaa549040c6963df0fe8bada1b1e..6b7c33dc05ec1a13e35c9e95fb3baa65373e8272 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -87,4 +87,17 @@ scoped_refptr<CrxInstaller> OpenChromeExtension(
return installer;
}
+bool IsExtensionDownload(const DownloadItem& download_item) {
+ if (download_item.PromptUserForSaveLocation())
+ return false;
+
+ if (download_item.GetMimeType() == extensions::Extension::kMimeType ||
+ UserScript::IsURLUserScript(download_item.GetURL(),
+ download_item.GetMimeType())) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
} // namespace download_crx_util
« no previous file with comments | « chrome/browser/download/download_crx_util.h ('k') | chrome/browser/download/download_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698