Index: chrome/browser/extensions/external_pref_loader.cc |
diff --git a/chrome/browser/extensions/external_pref_loader.cc b/chrome/browser/extensions/external_pref_loader.cc |
index 9a32ac34426b0a623573cd45e60c32fe043eccbf..27228d09d8fcd155d39e494d204d7d90a378e757 100644 |
--- a/chrome/browser/extensions/external_pref_loader.cc |
+++ b/chrome/browser/extensions/external_pref_loader.cc |
@@ -25,6 +25,10 @@ namespace { |
base::FilePath::CharType kExternalExtensionJson[] = |
FILE_PATH_LITERAL("external_extensions.json"); |
+// Keep this delay greater or close to priority settings sync timeout (10 sec) |
Nikita (slow)
2014/10/23 14:22:47
For the reference: kSyncTimeoutSeconds.
asargent_no_longer_on_chrome
2014/10/23 22:34:35
optional: Is it worth putting this constant name i
Dmitry Polukhin
2014/10/24 11:40:42
Removed this constant.
|
+// on Chrome OS login. |
+const int kMsDelayPrefLoad = 15 * 1000; |
+ |
std::set<base::FilePath> GetPrefsCandidateFilesFromFolder( |
const base::FilePath& external_extension_search_path) { |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
@@ -104,9 +108,16 @@ const base::FilePath ExternalPrefLoader::GetBaseCrxFilePath() { |
void ExternalPrefLoader::StartLoading() { |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- BrowserThread::PostTask( |
- BrowserThread::FILE, FROM_HERE, |
- base::Bind(&ExternalPrefLoader::LoadOnFileThread, this)); |
+ if (options_ & DELAY_LOAD) { |
+ BrowserThread::PostDelayedTask( |
+ BrowserThread::FILE, FROM_HERE, |
+ base::Bind(&ExternalPrefLoader::LoadOnFileThread, this), |
+ base::TimeDelta::FromMillisecondsD(kMsDelayPrefLoad)); |
+ } else { |
+ BrowserThread::PostTask( |
+ BrowserThread::FILE, FROM_HERE, |
+ base::Bind(&ExternalPrefLoader::LoadOnFileThread, this)); |
+ } |
} |
void ExternalPrefLoader::LoadOnFileThread() { |