| Index: components/offline_pages/core/offline_page_feature.cc
|
| diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc
|
| index ef2b4700ca49aa982799f4ad83b8f395822f47c7..9f283129f19998394c55e78a14e01f77ed38b763 100644
|
| --- a/components/offline_pages/core/offline_page_feature.cc
|
| +++ b/components/offline_pages/core/offline_page_feature.cc
|
| @@ -6,8 +6,19 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/command_line.h"
|
| #include "base/feature_list.h"
|
|
|
| +namespace switches {
|
| +
|
| +// This flag significantly shortens the delay between WebContentsObserver events
|
| +// and SnapshotController's StartSnapshot calls. The purpose is to speed up
|
| +// integration tests.
|
| +const char kOfflinePagesUseTestingSnapshotDelay[] =
|
| + "short-offline-page-snapshot-delay-for-test";
|
| +
|
| +} // namespace switches
|
| +
|
| namespace offline_pages {
|
|
|
| const base::Feature kOfflineBookmarksFeature{"OfflineBookmarks",
|
| @@ -68,4 +79,9 @@ bool ShouldUseNewBackgroundLoader() {
|
| return base::FeatureList::IsEnabled(kNewBackgroundLoaderFeature);
|
| }
|
|
|
| +bool ShouldUseTestingSnapshotDelay() {
|
| + base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
|
| + return cl->HasSwitch(switches::kOfflinePagesUseTestingSnapshotDelay);
|
| +}
|
| +
|
| } // namespace offline_pages
|
|
|