Commit 5b38b177 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Notify download manager initialization properly for incognito profile

For incognito profiles, we don't load history db. So we should not wait
for history to be loaded and send the OnManagerInitialized callback as
soon as the in-progress cache is ready. Without this initialization
notification, the observers will fail to function correctly.

TBR=qinmin@chromium.org

Bug: 987535
Change-Id: Idf960e2b60dbec302b8be847ba0b784dfa884cf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718776
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681081}
parent acf9fd18
...@@ -1121,7 +1121,8 @@ void DownloadManagerImpl::PostInitialization( ...@@ -1121,7 +1121,8 @@ void DownloadManagerImpl::PostInitialization(
// Download manager is only initialized if both history db and in progress // Download manager is only initialized if both history db and in progress
// cache are initialized. // cache are initialized.
if (!history_db_initialized_ || !in_progress_cache_initialized_) bool history_loaded = history_db_initialized_ || IsOffTheRecord();
if (!history_loaded || !in_progress_cache_initialized_)
return; return;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
......
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