Reland 0a1b4fb27a194a6c4ec3fa22040a4e8152cd45b
(https://chromium-review.googlesource.com/c/chromium/src/+/1344880)
Relative to the original CL, this changes the setter for skipping
scheduled updates into a global value that can be set by browser tests
prior to constructing and kicking off the extension updater. This is
the pattern used by content verification and other extension-behavior
customization.
It's my hope that taking this approach will eliminate a lot of long-
standing flakiness in several of the tests, so if this sticks I can
follow it up with a CL re-enabling several tests. (Or another person
who has a better relationship with extensions can.)
OCL description:
> Simplify extension update check delay after browser start.
>
> Bug: 907219
> Change-Id: I067fcb333b43f60441e1789cac8caf5b996b7e5d
> Reviewed-on: https://chromium-review.googlesource.com/c/1344880
> Commit-Queue: Joshua Pawlicki <[email protected]>
> Reviewed-by: Gabriel Charette <[email protected]>
> Reviewed-by: Sergey Poromov <[email protected]>
> Reviewed-by: Brian White <[email protected]>
> Reviewed-by: Devlin <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#620845}
Bug: 907219, 920040
Change-Id: I35ff0311f84294eca6cd1b23a3fd612d53ea42db
Reviewed-on: https://chromium-review.googlesource.com/c/1412796
Auto-Submit: Joshua Pawlicki <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Brian White <[email protected]>
Reviewed-by: Sergey Poromov <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Commit-Queue: Joshua Pawlicki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#624302}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 554195b..326be03 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -384,6 +384,10 @@
// perhaps be kept around longer than the others.
const char kHttpServerProperties[] = "net.http_server_properties";
+// Deprecated 1/2019.
+const char kNextUpdateCheck[] = "extensions.autoupdate.next_check";
+const char kLastUpdateCheck[] = "extensions.autoupdate.last_check";
+
// Register prefs used only for migration (clearing or moving to a new key).
void RegisterProfilePrefsForMigration(
user_prefs::PrefRegistrySyncable* registry) {
@@ -411,6 +415,8 @@
registry->RegisterIntegerPref(kNuxOnboardGroup, 0);
registry->RegisterDictionaryPref(kHttpServerProperties,
PrefRegistry::LOSSY_PREF);
+ registry->RegisterIntegerPref(kLastUpdateCheck, 0);
+ registry->RegisterIntegerPref(kNextUpdateCheck, 0);
}
} // namespace
@@ -891,4 +897,8 @@
// Added 12/2018.
profile_prefs->ClearPref(prefs::kDataSaverPromptsShown);
#endif
+
+ // Added 1/2019.
+ profile_prefs->ClearPref(kLastUpdateCheck);
+ profile_prefs->ClearPref(kNextUpdateCheck);
}