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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java

Issue 2809223003: Fix DownloadNotificationService crash caused by early getLastUsedProfile() call (Closed)
Patch Set: Fix tests on KitKat (ServiceTestCase is buggy on KitKat) Created 3 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
index 095e521f848c3071eb0d7c7389dbdfb92bf1dea2..08d2a12fa4f284ec4b49e1debbbe8d7693d4173f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
@@ -35,7 +35,6 @@ import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.ObserverList;
import org.chromium.base.VisibleForTesting;
-import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
import org.chromium.base.library_loader.ProcessInitException;
import org.chromium.base.metrics.RecordHistogram;
@@ -589,7 +588,9 @@ public class DownloadNotificationService extends Service {
@VisibleForTesting
void cancelOffTheRecordDownloads() {
- boolean cancelActualDownload = LibraryLoader.isInitialized()
+ boolean cancelActualDownload =
+ BrowserStartupController.get(LibraryProcessType.PROCESS_BROWSER)
+ .isStartupSuccessfullyCompleted()
&& Profile.getLastUsedProfile().hasOffTheRecordProfile();
List<DownloadSharedPreferenceEntry> entries = mDownloadSharedPreferenceHelper.getEntries();
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698