Commit 722b2e29 authored by wutao's avatar wutao Committed by Commit Bot

cros: Add pref for Launcher continue reading

This cl adds a pref to turn off Launcher continue reading feature.

Bug: 843839, 872481
Test: manual.
Change-Id: I46553972af783ebc32cdb7fbab76ae207b9474ba
Reviewed-on: https://chromium-review.googlesource.com/1168733Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581913}
parent 1533915c
......@@ -303,6 +303,7 @@ void Preferences::RegisterProfilePrefs(
prefs::kUse24HourClock,
base::GetHourClockType() == base::k24HourClock,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kAppListContinueReadingEnabled, true);
registry->RegisterBooleanPref(prefs::kCameraMediaConsolidated, false);
registry->RegisterBooleanPref(
drive::prefs::kDisableDrive, false,
......
......@@ -46,6 +46,7 @@
#include "chrome/browser/ui/app_list/search/crostini_app_result.h"
#include "chrome/browser/ui/app_list/search/extension_app_result.h"
#include "chrome/browser/ui/app_list/search/internal_app_result.h"
#include "chrome/common/pref_names.h"
#include "components/browser_sync/profile_sync_service.h"
#include "components/sync/driver/sync_service.h"
#include "components/sync/driver/sync_service_observer.h"
......@@ -372,7 +373,9 @@ class InternalDataSource : public AppSearchProvider::DataSource,
const base::Time time;
for (const auto& internal_app : GetInternalAppList()) {
if (!std::strcmp(internal_app.app_id, kInternalAppIdContinueReading) &&
!features::IsContinueReadingEnabled()) {
(!features::IsContinueReadingEnabled() ||
!profile()->GetPrefs()->GetBoolean(
prefs::kAppListContinueReadingEnabled))) {
continue;
}
......
......@@ -1925,6 +1925,10 @@ const char kRemoveUsersRemoteCommand[] = "remove_users_remote_command";
// Whether camera-produced media files have been consolidated to one place.
const char kCameraMediaConsolidated[] = "camera_media_consolidated";
// Boolean that indicates whether users can continue reading a web page when
// they switch from phones or tablets to Chromebook.
const char kAppListContinueReadingEnabled[] =
"app_list.continue_reading_enabled";
#endif // defined(OS_CHROMEOS)
// Whether there is a Flash version installed that supports clearing LSO data.
......
......@@ -744,6 +744,7 @@ extern const char kMediaGalleriesRememberedGalleries[];
extern const char kShelfChromeIconIndex[];
extern const char kPinnedLauncherApps[];
extern const char kPolicyPinnedLauncherApps[];
extern const char kAppListContinueReadingEnabled[];
#endif // defined(OS_CHROMEOS)
#if defined(OS_WIN)
......
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