Commit d2ae250b authored by tby's avatar tby Committed by Chromium LUCI CQ

[Suggested files] Gate file chips behind suggested content toggle

Bug: 1034842
Change-Id: I00eb83f557262e97d990cd4544b55a68f8c31aa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617403Reviewed-by: default avatarRachel Wong <wrong@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842833}
parent 811614ff
......@@ -72,7 +72,9 @@ DriveZeroStateProvider::DriveZeroStateProvider(
drive_service_(
drive::DriveIntegrationServiceFactory::GetForProfile(profile)),
item_suggest_cache_(profile, std::move(url_loader_factory)),
suggested_files_enabled_(app_list_features::IsSuggestedFilesEnabled()) {
suggested_files_enabled_(app_list_features::IsSuggestedFilesEnabled() &&
profile->GetPrefs()->GetBoolean(
chromeos::prefs::kSuggestedContentEnabled)) {
DCHECK(profile_);
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
task_runner_ = base::ThreadPool::CreateSequencedTaskRunner(
......
......@@ -68,7 +68,8 @@ class DriveZeroStateProvider : public SearchProvider,
base::TimeTicks query_start_time_;
// Whether the suggested files experiment is enabled.
// Whether suggested files feature is enabled. True if both the experiment is
// enabled, and the suggested content toggle is enabled.
const bool suggested_files_enabled_;
// The normalizer normalizes the relevance scores of Results
......
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