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

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

Issue 12850002: Move download filename determintion into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests on Android Created 7 years, 8 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/download_crx_util.cc
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index 3834b40bd6e3f6f15e6de6c1fda515cb02ee0053..d3afa8b188ca7c8cc8feb9a2e309fa8bcf336af1 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -125,8 +125,12 @@ bool IsExtensionDownload(const DownloadItem& download_item) {
}
bool OffStoreInstallAllowedByPrefs(Profile* profile, const DownloadItem& item) {
- extensions::ExtensionPrefs* prefs = extensions::ExtensionSystem::Get(
- profile)->extension_service()->extension_prefs();
+ ExtensionService* service = extensions::ExtensionSystem::Get(
+ profile)->extension_service();
+ if (!service)
+ return false;
+
+ extensions::ExtensionPrefs* prefs = service->extension_prefs();
CHECK(prefs);
extensions::URLPatternSet url_patterns = prefs->GetAllowedInstallSites();
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate_unittest.cc ('k') | chrome/browser/download/download_file_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698