[User Education] Organize components/user_education/common
The folder was getting very big and was getting bigger with the addition
of code for User Education 2.5. In preparation for adding that code,
this CL renames several files and classes to better represent their
function and sorts them all into subfolders.
The renames are all from [X]FeaturePromo[X] to [X]UserEducation[X]
for classes that are now used across User Education instead of just
by the IPH system.
Includes have been changed across the codebase to reflect these moves.
BYPASS_LARGE_CHANGE_WARNING
There is no change in functionality.
Bug: 369887157
Change-Id: I83f8ed9c996c40de3a832bac079ae62667bcc99f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949424
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Mike Wasserman <[email protected]>
Reviewed-by: Marlon Facey <[email protected]>
Reviewed-by: Glenn Hartmann <[email protected]>
Reviewed-by: Mustafa Emre Acer <[email protected]>
Reviewed-by: Charles Meng <[email protected]>
Reviewed-by: David Black <[email protected]>
Reviewed-by: Martin Šrámek <[email protected]>
Commit-Queue: Dana Fried <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1372807}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 2b56b2e..2fa026e 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4111,10 +4111,10 @@
"usb/web_usb_chooser_desktop.h",
"usb/web_usb_detector.cc",
"usb/web_usb_detector.h",
- "user_education/browser_feature_promo_storage_service.cc",
- "user_education/browser_feature_promo_storage_service.h",
"user_education/browser_tutorial_service.cc",
"user_education/browser_tutorial_service.h",
+ "user_education/browser_user_education_storage_service.cc",
+ "user_education/browser_user_education_storage_service.h",
"user_education/recent_session_observer.cc",
"user_education/recent_session_observer.h",
"user_education/recent_session_tracker.cc",
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
index bba15cb..ae33fd1 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -186,7 +186,7 @@
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/user_annotations/user_annotations_service_factory.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_provider.h"
@@ -611,7 +611,7 @@
// Clear any stored User Education session data. Note that we can't clear a
// specific date range, as this is used for longitudinal metrics reporting,
// so selectively deleting entries would make the telemetry invalid.
- BrowserFeaturePromoStorageService::ClearUsageHistory(profile_);
+ BrowserUserEducationStorageService::ClearUsageHistory(profile_);
#endif
// Cleared for DATA_TYPE_HISTORY, DATA_TYPE_COOKIES and DATA_TYPE_PASSWORDS.
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
index a051bfc..5495c6c3 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
@@ -220,7 +220,7 @@
#include "components/password_manager/core/browser/split_stores_and_local_upm.h"
#include "testing/gmock/include/gmock/gmock.h"
#else
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "content/public/browser/host_zoom_map.h"
@@ -1479,9 +1479,9 @@
#if !BUILDFLAG(IS_ANDROID)
TEST_F(ChromeBrowsingDataRemoverDelegateTest,
ClearUserEducationSessionHistory) {
- auto& storage_service = static_cast<BrowserFeaturePromoStorageService&>(
+ auto& storage_service = static_cast<BrowserUserEducationStorageService&>(
UserEducationServiceFactory::GetForBrowserContext(GetProfile())
- ->feature_promo_storage_service());
+ ->user_education_storage_service());
RecentSessionData data;
data.enabled_time = base::Time::Now() - base::Days(90);
data.recent_session_start_times = {base::Time::Now(),
diff --git a/chrome/browser/lens/core/mojom/lens.mojom b/chrome/browser/lens/core/mojom/lens.mojom
index e33e4c4..644fbe0 100644
--- a/chrome/browser/lens/core/mojom/lens.mojom
+++ b/chrome/browser/lens/core/mojom/lens.mojom
@@ -204,7 +204,7 @@
// Requests to show a feature promo on the translate button. This is a no-op
// if the promo show fails for reasons listed out at
- // //components/user_education/common/feature_promo_result.h. The most common
+ // //components/user_education/common/feature_promo/feature_promo_result.h. The most common
// failures are due to the anchor not being visible or it has already been
// shown and dismissed.
MaybeShowTranslateFeaturePromo();
diff --git a/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper.cc b/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper.cc
index 36cc396..6582cfd 100644
--- a/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper.cc
+++ b/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/user_education/user_education_service.h"
#include "components/feature_engagement/public/event_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/base/ui_base_features.h"
void NewTabPageFeaturePromoHelper::RecordPromoFeatureUsageAndClosePromo(
diff --git a/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper_unittest.cc b/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper_unittest.cc
index faf06c2e..0e42b0d 100644
--- a/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper_unittest.cc
+++ b/chrome/browser/new_tab_page/feature_promo_helper/new_tab_page_feature_promo_helper_unittest.cc
@@ -13,7 +13,7 @@
#include "components/feature_engagement/public/event_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/test/scoped_iph_feature_list.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/user_education/test/mock_feature_promo_controller.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 5ed76b69..cf8da9a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -100,7 +100,7 @@
#include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/updates/announcement_notification/announcement_notification_service.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
#include "chrome/browser/webauthn/webauthn_pref_names.h"
#include "chrome/common/buildflags.h"
@@ -2142,7 +2142,7 @@
#else // BUILDFLAG(IS_ANDROID)
bookmarks_webui::RegisterProfilePrefs(registry);
browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
- BrowserFeaturePromoStorageService::RegisterProfilePrefs(registry);
+ BrowserUserEducationStorageService::RegisterProfilePrefs(registry);
captions::LiveTranslateController::RegisterProfilePrefs(registry);
CartService::RegisterProfilePrefs(registry);
ChromeAuthenticatorRequestDelegate::RegisterProfilePrefs(registry);
diff --git a/chrome/browser/ui/ash/user_education/chrome_user_education_delegate.cc b/chrome/browser/ui/ash/user_education/chrome_user_education_delegate.cc
index a3269c9..1a8c6b87 100644
--- a/chrome/browser/ui/ash/user_education/chrome_user_education_delegate.cc
+++ b/chrome/browser/ui/ash/user_education/chrome_user_education_delegate.cc
@@ -25,11 +25,11 @@
#include "chromeos/ash/components/file_manager/app_id.h"
#include "components/account_id/account_id.h"
#include "components/services/app_service/public/cpp/app_launch_util.h"
-#include "components/user_education/common/help_bubble.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/tutorial_registry.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "components/user_manager/user_manager.h"
#include "ui/base/interaction/element_tracker.h"
diff --git a/chrome/browser/ui/ash/user_education/chrome_user_education_delegate_unittest.cc b/chrome/browser/ui/ash/user_education/chrome_user_education_delegate_unittest.cc
index 22af0c3..bc2288f1 100644
--- a/chrome/browser/ui/ash/user_education/chrome_user_education_delegate_unittest.cc
+++ b/chrome/browser/ui/ash/user_education/chrome_user_education_delegate_unittest.cc
@@ -34,10 +34,10 @@
#include "chrome/test/base/testing_profile_manager.h"
#include "chromeos/ash/components/browser_context_helper/browser_context_helper.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/tutorial_description.h"
-#include "components/user_education/common/tutorial_registry.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "components/user_manager/scoped_user_manager.h"
#include "components/user_manager/user.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/ui/ash/user_education/views/help_bubble_factory_views_ash_browsertest.cc b/chrome/browser/ui/ash/user_education/views/help_bubble_factory_views_ash_browsertest.cc
index 738e411..0f8072e 100644
--- a/chrome/browser/ui/ash/user_education/views/help_bubble_factory_views_ash_browsertest.cc
+++ b/chrome/browser/ui/ash/user_education/views/help_bubble_factory_views_ash_browsertest.cc
@@ -16,9 +16,9 @@
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/test/base/in_process_browser_test.h"
-#include "components/user_education/common/help_bubble.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/autofill/autofill_field_promo_controller.h b/chrome/browser/ui/autofill/autofill_field_promo_controller.h
index 043a526..0287b11b2 100644
--- a/chrome/browser/ui/autofill/autofill_field_promo_controller.h
+++ b/chrome/browser/ui/autofill/autofill_field_promo_controller.h
@@ -9,7 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/autofill/autofill_field_promo_view.h"
#include "chrome/browser/ui/autofill/autofill_popup_hide_helper.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "ui/base/interaction/element_identifier.h"
namespace autofill {
diff --git a/chrome/browser/ui/autofill/autofill_field_promo_controller_impl_unittest.cc b/chrome/browser/ui/autofill/autofill_field_promo_controller_impl_unittest.cc
index 8b56073cc..3145bd1 100644
--- a/chrome/browser/ui/autofill/autofill_field_promo_controller_impl_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_field_promo_controller_impl_unittest.cc
@@ -10,8 +10,8 @@
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/test_browser_window.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "components/user_education/test/mock_feature_promo_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_user_data.h"
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc b/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
index cf18ca59..8979ba7 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
@@ -46,7 +46,7 @@
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "components/unified_consent/pref_names.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "components/user_education/test/mock_feature_promo_controller.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h"
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 5d435c7..1bfbdb5 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -155,7 +155,7 @@
#include "components/translate/core/browser/language_state.h"
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/common/translate_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "components/webapps/common/web_app_id.h"
#include "components/zoom/page_zoom.h"
diff --git a/chrome/browser/ui/profiles/signin_intercept_first_run_experience_dialog_browsertest.cc b/chrome/browser/ui/profiles/signin_intercept_first_run_experience_dialog_browsertest.cc
index 82862810..470beda5 100644
--- a/chrome/browser/ui/profiles/signin_intercept_first_run_experience_dialog_browsertest.cc
+++ b/chrome/browser/ui/profiles/signin_intercept_first_run_experience_dialog_browsertest.cc
@@ -39,7 +39,7 @@
#include "components/signin/public/base/signin_metrics.h"
#include "components/signin/public/base/signin_switches.h"
#include "components/sync/test/test_sync_service.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
diff --git a/chrome/browser/ui/toolbar/app_menu_model.cc b/chrome/browser/ui/toolbar/app_menu_model.cc
index fdfea5f..bc240d8b 100644
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -113,7 +113,7 @@
#include "components/signin/public/base/signin_pref_names.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/vector_icons/vector_icons.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
#include "components/webapps/browser/banners/install_banner_config.h"
diff --git a/chrome/browser/ui/user_education/browser_user_education_interface.h b/chrome/browser/ui/user_education/browser_user_education_interface.h
index 4ac224a..cc84947 100644
--- a/chrome/browser/ui/user_education/browser_user_education_interface.h
+++ b/chrome/browser/ui/user_education/browser_user_education_interface.h
@@ -9,10 +9,10 @@
#include "base/feature_list.h"
#include "base/types/pass_key.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
class AppMenuButton;
class BrowserFeaturePromoController;
diff --git a/chrome/browser/ui/user_education/low_usage_help_controller_browsertest.cc b/chrome/browser/ui/user_education/low_usage_help_controller_browsertest.cc
index a18978b..9436948 100644
--- a/chrome/browser/ui/user_education/low_usage_help_controller_browsertest.cc
+++ b/chrome/browser/ui/user_education/low_usage_help_controller_browsertest.cc
@@ -12,15 +12,15 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/feature_engagement/test/mock_tracker.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
+#include "components/user_education/common/user_education_data.h"
+#include "components/user_education/common/user_education_storage_service.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "ui/base/interaction/element_tracker.h"
@@ -55,7 +55,7 @@
// Send an event when there is a new session, then wait for the event.
Do([this]() {
auto& session_manager =
- GetUserEducationService().feature_promo_session_manager();
+ GetUserEducationService().user_education_session_manager();
if (session_manager.GetNewSessionSinceStartup()) {
SendSessionEvent();
} else {
@@ -119,8 +119,8 @@
}
IN_PROC_BROWSER_TEST_F(LowUsageHelpControllerBrowsertest, PRE_PromoAtStartup) {
- auto& storage_service = static_cast<BrowserFeaturePromoStorageService&>(
- GetUserEducationService().feature_promo_storage_service());
+ auto& storage_service = static_cast<BrowserUserEducationStorageService&>(
+ GetUserEducationService().user_education_storage_service());
const auto now = base::Time::Now();
@@ -132,7 +132,7 @@
// Mirror similar information in the recent session data so that a new
// session will be triggered on browser startup.
- user_education::FeaturePromoSessionData session_data;
+ user_education::UserEducationSessionData session_data;
session_data.start_time = now - base::Days(1);
session_data.most_recent_active_time = now - base::Hours(23);
diff --git a/chrome/browser/ui/user_education/polling_idle_observer.cc b/chrome/browser/ui/user_education/polling_idle_observer.cc
index 50507eae..ef2f03d 100644
--- a/chrome/browser/ui/user_education/polling_idle_observer.cc
+++ b/chrome/browser/ui/user_education/polling_idle_observer.cc
@@ -10,9 +10,9 @@
#include "base/check.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
-#include "components/user_education/common/feature_promo_idle_observer.h"
-#include "components/user_education/common/feature_promo_idle_policy.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
+#include "components/user_education/common/session/user_education_idle_observer.h"
+#include "components/user_education/common/session/user_education_idle_policy.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
#include "components/user_education/common/user_education_features.h"
#include "ui/base/idle/idle.h"
#include "ui/base/idle/idle_polling_service.h"
@@ -29,7 +29,7 @@
} // namespace
// Function called by `UserEducationServiceFactory` to create an idle observer.
-std::unique_ptr<user_education::FeaturePromoIdleObserver>
+std::unique_ptr<user_education::UserEducationIdleObserver>
CreatePollingIdleObserver() {
return std::make_unique<PollingIdleObserver>();
}
diff --git a/chrome/browser/ui/user_education/polling_idle_observer.h b/chrome/browser/ui/user_education/polling_idle_observer.h
index e6f2230..6368a75 100644
--- a/chrome/browser/ui/user_education/polling_idle_observer.h
+++ b/chrome/browser/ui/user_education/polling_idle_observer.h
@@ -10,14 +10,14 @@
#include "base/memory/raw_ref.h"
#include "base/scoped_observation.h"
#include "base/time/time.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
#include "ui/base/idle/idle_polling_service.h"
// Used to observe the system/application idle state, for purposes of session
// tracking for User Education. This implementation uses system calls to observe
// the locked and idle state as well as the presence of a foregrounded browser
// window.
-class PollingIdleObserver : public user_education::FeaturePromoIdleObserver,
+class PollingIdleObserver : public user_education::UserEducationIdleObserver,
public ui::IdlePollingService::Observer {
public:
PollingIdleObserver();
diff --git a/chrome/browser/ui/user_education/recent_session_observer_impl.h b/chrome/browser/ui/user_education/recent_session_observer_impl.h
index 4d7826d..6bb23634 100644
--- a/chrome/browser/ui/user_education/recent_session_observer_impl.h
+++ b/chrome/browser/ui/user_education/recent_session_observer_impl.h
@@ -11,7 +11,7 @@
#include "base/memory/raw_ref.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/user_education/recent_session_policy.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/recent_session_observer.h"
#include "chrome/browser/user_education/recent_session_tracker.h"
diff --git a/chrome/browser/ui/user_education/recent_session_policy.cc b/chrome/browser/ui/user_education/recent_session_policy.cc
index ef3c546..5b5dca3 100644
--- a/chrome/browser/ui/user_education/recent_session_policy.cc
+++ b/chrome/browser/ui/user_education/recent_session_policy.cc
@@ -10,7 +10,7 @@
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/time.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
namespace {
diff --git a/chrome/browser/ui/user_education/recent_session_policy.h b/chrome/browser/ui/user_education/recent_session_policy.h
index 3698b0a3..3c0701f9 100644
--- a/chrome/browser/ui/user_education/recent_session_policy.h
+++ b/chrome/browser/ui/user_education/recent_session_policy.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/time/time.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
// Class that defines policy for handling recent sessions.
// Allows recording of metrics and possibly modifying promo behavior.
diff --git a/chrome/browser/ui/user_education/recent_session_policy_unittest.cc b/chrome/browser/ui/user_education/recent_session_policy_unittest.cc
index c443571..15afcfd2 100644
--- a/chrome/browser/ui/user_education/recent_session_policy_unittest.cc
+++ b/chrome/browser/ui/user_education/recent_session_policy_unittest.cc
@@ -12,7 +12,7 @@
#include "base/metrics/field_trial_params.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/user_education/show_promo_in_page.cc b/chrome/browser/ui/user_education/show_promo_in_page.cc
index 051dc7e..f46f6b0 100644
--- a/chrome/browser/ui/user_education/show_promo_in_page.cc
+++ b/chrome/browser/ui/user_education/show_promo_in_page.cc
@@ -19,9 +19,9 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/webui/help_bubble_webui.h"
#include "content/public/browser/navigation_handle.h"
#include "ui/base/interaction/element_tracker.h"
diff --git a/chrome/browser/ui/user_education/show_promo_in_page.h b/chrome/browser/ui/user_education/show_promo_in_page.h
index 90722b0..debc30c 100644
--- a/chrome/browser/ui/user_education/show_promo_in_page.h
+++ b/chrome/browser/ui/user_education/show_promo_in_page.h
@@ -13,7 +13,7 @@
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "ui/base/interaction/element_identifier.h"
#include "url/gurl.h"
diff --git a/chrome/browser/ui/user_education/show_promo_in_page_browsertest.cc b/chrome/browser/ui/user_education/show_promo_in_page_browsertest.cc
index c42166a..88de158 100644
--- a/chrome/browser/ui/user_education/show_promo_in_page_browsertest.cc
+++ b/chrome/browser/ui/user_education/show_promo_in_page_browsertest.cc
@@ -20,7 +20,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/user_education/show_promo_in_page_interactive_uitest.cc b/chrome/browser/ui/user_education/show_promo_in_page_interactive_uitest.cc
index 7f63b15..0057761 100644
--- a/chrome/browser/ui/user_education/show_promo_in_page_interactive_uitest.cc
+++ b/chrome/browser/ui/user_education/show_promo_in_page_interactive_uitest.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/user_education/show_promo_in_page.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/user_education/start_tutorial_in_page.cc b/chrome/browser/ui/user_education/start_tutorial_in_page.cc
index cec8700..435e871 100644
--- a/chrome/browser/ui/user_education/start_tutorial_in_page.cc
+++ b/chrome/browser/ui/user_education/start_tutorial_in_page.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
diff --git a/chrome/browser/ui/user_education/start_tutorial_in_page.h b/chrome/browser/ui/user_education/start_tutorial_in_page.h
index 3c2f7ab9..3f9c2817 100644
--- a/chrome/browser/ui/user_education/start_tutorial_in_page.h
+++ b/chrome/browser/ui/user_education/start_tutorial_in_page.h
@@ -10,8 +10,8 @@
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/profiles/profile.h"
-#include "components/user_education/common/tutorial_identifier.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "url/gurl.h"
class Browser;
diff --git a/chrome/browser/ui/user_education/start_tutorial_in_page_browsertest.cc b/chrome/browser/ui/user_education/start_tutorial_in_page_browsertest.cc
index acb1360a..5f047ea 100644
--- a/chrome/browser/ui/user_education/start_tutorial_in_page_browsertest.cc
+++ b/chrome/browser/ui/user_education/start_tutorial_in_page_browsertest.cc
@@ -18,8 +18,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/tutorial_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
diff --git a/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils.cc b/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils.cc
index 30ae6fa1..3218cbcc 100644
--- a/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils.cc
+++ b/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils.cc
@@ -48,7 +48,7 @@
#include "components/password_manager/core/common/password_manager_constants.h"
#include "components/plus_addresses/grit/plus_addresses_strings.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "components/user_education/views/new_badge_label.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils_browsertest.cc b/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils_browsertest.cc
index 85c0dc64..14b495213 100644
--- a/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils_browsertest.cc
+++ b/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils_browsertest.cc
@@ -22,7 +22,7 @@
#include "components/autofill/core/browser/ui/suggestion.h"
#include "components/autofill/core/browser/ui/suggestion_type.h"
#include "components/compose/core/browser/compose_features.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "components/user_education/common/user_education_features.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/views/autofill/popup/popup_view_views.cc b/chrome/browser/ui/views/autofill/popup/popup_view_views.cc
index f491757..4700e1b8 100644
--- a/chrome/browser/ui/views/autofill/popup/popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/popup/popup_view_views.cc
@@ -63,7 +63,7 @@
#include "components/password_manager/core/browser/password_sync_util.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/service/sync_service.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "content/public/browser/web_contents.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/common/input/web_input_event.h"
diff --git a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
index e171614..fbc1b2b 100644
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -41,7 +41,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/event_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "content/public/browser/web_contents.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"
diff --git a/chrome/browser/ui/views/extensions/extensions_toolbar_container_view_controller.cc b/chrome/browser/ui/views/extensions/extensions_toolbar_container_view_controller.cc
index 4806600..20c98512 100644
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container_view_controller.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container_view_controller.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/views/extensions/extensions_request_access_button.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_button.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_container.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "extensions/common/extension_features.h"
ExtensionsToolbarContainerViewController::
diff --git a/chrome/browser/ui/views/frame/app_menu_button.h b/chrome/browser/ui/views/frame/app_menu_button.h
index a80eadae..0952a97 100644
--- a/chrome/browser/ui/views/frame/app_menu_button.h
+++ b/chrome/browser/ui/views/frame/app_menu_button.h
@@ -11,7 +11,7 @@
#include "base/observer_list.h"
#include "base/timer/elapsed_timer.h"
#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
-#include "components/user_education/common/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
#include "ui/base/metadata/metadata_header_macros.h"
class AppMenu;
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 8c08f4c3..2c21066 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -216,11 +216,11 @@
#include "components/sync/service/sync_service.h"
#include "components/translate/core/browser/language_state.h"
#include "components/translate/core/browser/translate_manager.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "components/user_education/common/user_education_features.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/version_info/channel.h"
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index bdb273f..78389982 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -46,8 +46,8 @@
#include "components/enterprise/buildflags/buildflags.h"
#include "components/infobars/core/infobar_container.h"
#include "components/segmentation_platform/public/result.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
#include "content/public/browser/page_user_data.h"
#include "content/public/browser/permission_controller.h"
diff --git a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc
index 6f7bec5..1830e66 100644
--- a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc
+++ b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc
@@ -29,7 +29,7 @@
#include "components/language/core/browser/language_model.h"
#include "components/language/core/browser/language_model_manager.h"
#include "components/live_caption/caption_util.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/vector_icons/vector_icons.h"
#include "media/base/media_switches.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 53f3337..11969121 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -26,8 +26,8 @@
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
index b8c7f01..e67b001 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/content_settings/content_setting_image_model.h"
#include "chrome/browser/ui/content_settings/content_setting_image_model_states.h"
#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
-#include "components/user_education/common/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/views/view.h"
diff --git a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.cc b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.cc
index c01f015..2df532a 100644
--- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.cc
@@ -24,7 +24,7 @@
#include "components/omnibox/browser/vector_icons.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/privacy_sandbox/tracking_protection_settings.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "content/public/browser/web_contents.h"
#include "cookie_controls_bubble_coordinator.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.h b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.h
index 79704a57..9d339f8c 100644
--- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.h
+++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_icon_view.h
@@ -14,7 +14,7 @@
#include "components/content_settings/browser/ui/cookie_controls_controller.h"
#include "components/content_settings/browser/ui/cookie_controls_view.h"
#include "components/content_settings/core/common/cookie_blocking_3pcd_status.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "ui/base/metadata/metadata_header_macros.h"
// View for the cookie control icon in the Omnibox. This is the new version of
diff --git a/chrome/browser/ui/views/location_bar/star_view.h b/chrome/browser/ui/views/location_bar/star_view.h
index 6e9273b..9d42db03 100644
--- a/chrome/browser/ui/views/location_bar/star_view.h
+++ b/chrome/browser/ui/views/location_bar/star_view.h
@@ -8,7 +8,7 @@
#include "base/memory/raw_ptr.h"
#include "chrome/browser/ui/views/page_action/page_action_icon_view.h"
#include "components/prefs/pref_member.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/base/metadata/metadata_header_macros.h"
class Browser;
diff --git a/chrome/browser/ui/views/page_action/pwa_install_view.cc b/chrome/browser/ui/views/page_action/pwa_install_view.cc
index e2334406..bda1c8f 100644
--- a/chrome/browser/ui/views/page_action/pwa_install_view.cc
+++ b/chrome/browser/ui/views/page_action/pwa_install_view.cc
@@ -29,9 +29,9 @@
#include "components/feature_engagement/public/feature_constants.h"
#include "components/omnibox/browser/vector_icons.h"
#include "components/site_engagement/content/site_engagement_service.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
#include "components/webapps/browser/banners/web_app_banner_data.h"
diff --git a/chrome/browser/ui/views/page_action/pwa_install_view.h b/chrome/browser/ui/views/page_action/pwa_install_view.h
index 828efb45..3d2f1f8 100644
--- a/chrome/browser/ui/views/page_action/pwa_install_view.h
+++ b/chrome/browser/ui/views/page_action/pwa_install_view.h
@@ -8,7 +8,7 @@
#include "base/memory/raw_ptr.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/page_action/page_action_icon_view.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "ui/base/metadata/metadata_header_macros.h"
class Browser;
diff --git a/chrome/browser/ui/views/performance_controls/memory_saver_iph_interactive_uitest.cc b/chrome/browser/ui/views/performance_controls/memory_saver_iph_interactive_uitest.cc
index bb502135..dfd0151 100644
--- a/chrome/browser/ui/views/performance_controls/memory_saver_iph_interactive_uitest.cc
+++ b/chrome/browser/ui/views/performance_controls/memory_saver_iph_interactive_uitest.cc
@@ -19,7 +19,7 @@
#include "components/feature_engagement/public/feature_constants.h"
#include "components/performance_manager/public/features.h"
#include "components/performance_manager/public/user_tuning/prefs.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
diff --git a/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc b/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index ee9f399..18ea4cd 100644
--- a/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ b/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/ui/views/profiles/incognito_menu_view.h"
#include "chrome/browser/ui/views/profiles/profile_menu_view_base.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_utils.h"
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc
index 7b75ec44..fff74ad3 100644
--- a/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc
+++ b/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/test/bind.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
@@ -93,7 +93,7 @@
#include "components/sync/service/sync_service.h"
#include "components/sync/service/sync_user_settings.h"
#include "components/sync/test/fake_server_network_resources.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/webapps/common/web_app_id.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/test/browser_test.h"
diff --git a/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.cc b/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.cc
index ff4c39e..eef99a7 100644
--- a/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.cc
+++ b/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.cc
@@ -20,8 +20,8 @@
tracker_service,
&user_education_service->feature_promo_registry(),
&user_education_service->help_bubble_factory_registry(),
- &user_education_service->feature_promo_storage_service(),
- &user_education_service->feature_promo_session_policy(),
+ &user_education_service->user_education_storage_service(),
+ &user_education_service->user_education_session_policy(),
&user_education_service->tutorial_service(),
&user_education_service->product_messaging_controller()),
profile_picker_view_(profile_picker_view) {
diff --git a/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.h b/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.h
index 23cf62a9..679ab94 100644
--- a/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.h
+++ b/chrome/browser/ui/views/profiles/profile_picker_feature_promo_controller.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_PICKER_FEATURE_PROMO_CONTROLLER_H_
#define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_PICKER_FEATURE_PROMO_CONTROLLER_H_
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
class UserEducationService;
class ProfilePickerView;
diff --git a/chrome/browser/ui/views/profiles/profile_picker_view.h b/chrome/browser/ui/views/profiles/profile_picker_view.h
index c237efd..59a3d93 100644
--- a/chrome/browser/ui/views/profiles/profile_picker_view.h
+++ b/chrome/browser/ui/views/profiles/profile_picker_view.h
@@ -19,7 +19,7 @@
#include "chrome/browser/ui/views/profiles/profile_picker_force_signin_dialog_host.h"
#include "chrome/browser/ui/views/profiles/profile_picker_web_contents_host.h"
#include "components/keep_alive_registry/scoped_keep_alive.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h"
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc
index 2f5b56e..ee70b32e 100644
--- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc
+++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc
@@ -27,7 +27,7 @@
#include "components/language/core/browser/language_model.h"
#include "components/language/core/browser/language_model_manager.h"
#include "components/language/core/common/locale_util.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_types.h"
diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
index 5602905..31587ed1 100644
--- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
+++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
@@ -49,8 +49,8 @@
#include "components/feature_engagement/public/feature_constants.h"
#include "components/lens/lens_features.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "ui/actions/action_id.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc
index 1a65825e7..e225e5f 100644
--- a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc
@@ -30,7 +30,7 @@
#include "chrome/common/pref_names.h"
#include "components/omnibox/browser/omnibox_edit_model.h"
#include "components/omnibox/browser/omnibox_popup_view.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "ui/events/event.h"
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
index 5300d5a1..85f4ccb 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
@@ -34,7 +34,7 @@
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/accessibility/ax_action_data.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
index 46e5a59..65cb8b34 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
@@ -11,8 +11,8 @@
#include "chrome/browser/ui/toolbar/app_menu_icon_controller.h"
#include "chrome/browser/ui/toolbar/app_menu_model.h"
#include "chrome/browser/ui/views/frame/app_menu_button.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/view.h"
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button_interactive_uitest.cc b/chrome/browser/ui/views/toolbar/browser_app_menu_button_interactive_uitest.cc
index 4f1d153..d6f1b49 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button_interactive_uitest.cc
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button_interactive_uitest.cc
@@ -26,7 +26,7 @@
#include "chrome/test/interaction/tracked_element_webcontents.h"
#include "chrome/test/interaction/webcontents_interaction_test_util.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.cc b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.cc
index 8cf15b7..b1fc316 100644
--- a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.cc
+++ b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/grit/generated_resources.h"
#include "components/flags_ui/feature_entry.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "components/user_education/views/new_badge_label.h"
#include "extensions/browser/api/feedback_private/feedback_private_api.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.h b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.h
index 64f0d761..2d3b05c 100644
--- a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.h
+++ b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_item_view.h
@@ -7,7 +7,7 @@
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/view.h"
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.cc b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.cc
index 742d227..774c536 100644
--- a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.cc
+++ b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.cc
@@ -33,7 +33,7 @@
#include "components/flags_ui/flags_state.h"
#include "components/flags_ui/flags_storage.h"
#include "components/prefs/scoped_user_pref_update.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.h b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.h
index 136be45..ba954a4 100644
--- a/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.h
+++ b/chrome/browser/ui/views/toolbar/chrome_labs/chrome_labs_view_controller.h
@@ -7,7 +7,7 @@
#include "base/callback_list.h"
#include "base/memory/raw_ptr.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
class Browser;
class ChromeLabsModel;
diff --git a/chrome/browser/ui/views/toolbar/toolbar_controller_interactive_uitest.cc b/chrome/browser/ui/views/toolbar/toolbar_controller_interactive_uitest.cc
index 379085b..52b8bb5 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_controller_interactive_uitest.cc
@@ -33,7 +33,7 @@
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/test/scoped_iph_feature_list.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
diff --git a/chrome/browser/ui/views/user_education/autofill_help_bubble_factory.h b/chrome/browser/ui/views/user_education/autofill_help_bubble_factory.h
index a00e339..244e5b6 100644
--- a/chrome/browser/ui/views/user_education/autofill_help_bubble_factory.h
+++ b/chrome/browser/ui/views/user_education/autofill_help_bubble_factory.h
@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_AUTOFILL_HELP_BUBBLE_FACTORY_H_
#define CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_AUTOFILL_HELP_BUBBLE_FACTORY_H_
-#include "components/user_education/common/help_bubble.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_delegate.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "ui/base/interaction/element_tracker.h"
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
index 46385bda..79b7e00 100644
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
@@ -37,8 +37,8 @@
feature_engagement::Tracker* feature_engagement_tracker,
user_education::FeaturePromoRegistry* registry,
user_education::HelpBubbleFactoryRegistry* help_bubble_registry,
- user_education::FeaturePromoStorageService* storage_service,
- user_education::FeaturePromoSessionPolicy* session_policy,
+ user_education::UserEducationStorageService* storage_service,
+ user_education::UserEducationSessionPolicy* session_policy,
user_education::TutorialService* tutorial_service,
user_education::ProductMessagingController* messaging_controller)
: FeaturePromoControllerCommon(feature_engagement_tracker,
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h
index 4f59a94..ee47975d 100644
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h
@@ -10,8 +10,8 @@
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "ui/base/interaction/element_identifier.h"
namespace feature_engagement {
@@ -25,8 +25,8 @@
namespace user_education {
class FeaturePromoRegistry;
-class FeaturePromoSessionPolicy;
-class FeaturePromoStorageService;
+class UserEducationSessionPolicy;
+class UserEducationStorageService;
class HelpBubbleFactoryRegistry;
class ProductMessagingController;
class TutorialService;
@@ -54,8 +54,8 @@
feature_engagement::Tracker* feature_engagement_tracker,
user_education::FeaturePromoRegistry* registry,
user_education::HelpBubbleFactoryRegistry* help_bubble_registry,
- user_education::FeaturePromoStorageService* storage_service,
- user_education::FeaturePromoSessionPolicy* session_policy,
+ user_education::UserEducationStorageService* storage_service,
+ user_education::UserEducationSessionPolicy* session_policy,
user_education::TutorialService* tutorial_service,
user_education::ProductMessagingController* messaging_controller);
~BrowserFeaturePromoController() override;
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc
index 4c89bbd..b31b6f6 100644
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc
@@ -2,31 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/strings/stringprintf.h"
-#include "base/time/time.h"
-#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
-
#include <memory>
#include <utility>
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
+#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
+#include "base/time/time.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
+#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/user_education_data.h"
+#include "components/user_education/common/user_education_storage_service.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc
index 530479d..03b70d7 100644
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc
@@ -42,22 +42,22 @@
#include "components/feature_engagement/public/tracker.h"
#include "components/feature_engagement/test/mock_tracker.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/common/product_messaging_controller.h"
-#include "components/user_education/common/tutorial.h"
-#include "components/user_education/common/tutorial_description.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "components/user_education/common/user_education_class_properties.h"
+#include "components/user_education/common/user_education_data.h"
#include "components/user_education/common/user_education_features.h"
-#include "components/user_education/test/feature_promo_session_test_util.h"
+#include "components/user_education/common/user_education_storage_service.h"
+#include "components/user_education/test/user_education_session_test_util.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -121,10 +121,8 @@
using user_education::FeaturePromoPolicyData;
using user_education::FeaturePromoRegistry;
using user_education::FeaturePromoResult;
-using user_education::FeaturePromoSessionData;
using user_education::FeaturePromoSpecification;
using user_education::FeaturePromoStatus;
-using user_education::FeaturePromoStorageService;
using user_education::HelpBubble;
using user_education::HelpBubbleArrow;
using user_education::HelpBubbleFactoryRegistry;
@@ -132,6 +130,8 @@
using user_education::HelpBubbleView;
using user_education::HelpBubbleViews;
using user_education::TutorialDescription;
+using user_education::UserEducationSessionData;
+using user_education::UserEducationStorageService;
using BubbleCloseCallback = BrowserFeaturePromoController::BubbleCloseCallback;
using ShowPromoCallback =
@@ -182,7 +182,7 @@
// Ensure that the new profile grace period has ended by default.
auto& storage_service =
- user_education_service->feature_promo_storage_service();
+ user_education_service->user_education_storage_service();
storage_service.set_profile_creation_time_for_testing(
storage_service.GetCurrentTime() - base::Days(365));
@@ -403,7 +403,7 @@
return params;
}
- FeaturePromoStorageService* storage_service() {
+ UserEducationStorageService* storage_service() {
return controller_->storage_service();
}
@@ -2086,17 +2086,17 @@
return std::move(
WithView(kBrowserViewElementId, [this, since_session_start,
idle_time](BrowserView* browser_view) {
- FeaturePromoSessionData session_data;
+ UserEducationSessionData session_data;
session_data.start_time = kSessionStartTime;
session_data.most_recent_active_time =
kSessionStartTime + since_session_start;
now_ = session_data.most_recent_active_time + idle_time;
FeaturePromoPolicyData policy_data;
test_util_ = std::make_unique<
- user_education::test::FeaturePromoSessionTestUtil>(
+ user_education::test::UserEducationSessionTestUtil>(
UserEducationServiceFactory::GetForBrowserContext(
browser_view->GetProfile())
- ->feature_promo_session_manager(),
+ ->user_education_session_manager(),
session_data, policy_data, session_data.most_recent_active_time,
now_);
}).SetDescription("ResetSessionData"));
@@ -2159,7 +2159,8 @@
user_education::features::GetSnoozeDuration());
}
- std::unique_ptr<user_education::test::FeaturePromoSessionTestUtil> test_util_;
+ std::unique_ptr<user_education::test::UserEducationSessionTestUtil>
+ test_util_;
base::Time now_;
};
diff --git a/chrome/browser/ui/views/user_education/browser_user_education_service.cc b/chrome/browser/ui/views/user_education/browser_user_education_service.cc
index 13b8c76..b4520ac 100644
--- a/chrome/browser/ui/views/user_education/browser_user_education_service.cc
+++ b/chrome/browser/ui/views/user_education/browser_user_education_service.cc
@@ -64,14 +64,14 @@
#include "components/strings/grit/components_strings.h"
#include "components/strings/grit/privacy_sandbox_strings.h"
#include "components/supervised_user/core/common/supervised_user_constants.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/new_badge_specification.h"
-#include "components/user_education/common/tutorial_description.h"
-#include "components/user_education/common/tutorial_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/new_badge/new_badge_specification.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
#include "components/user_education/common/user_education_features.h"
#include "components/user_education/common/user_education_metadata.h"
#include "components/user_education/views/help_bubble_delegate.h"
@@ -1650,8 +1650,8 @@
feature_engagement::TrackerFactory::GetForBrowserContext(profile),
&user_education_service->feature_promo_registry(),
&user_education_service->help_bubble_factory_registry(),
- &user_education_service->feature_promo_storage_service(),
- &user_education_service->feature_promo_session_policy(),
+ &user_education_service->user_education_storage_service(),
+ &user_education_service->user_education_session_policy(),
&user_education_service->tutorial_service(),
&user_education_service->product_messaging_controller());
}
diff --git a/chrome/browser/ui/views/user_education/browser_user_education_service_browsertest.cc b/chrome/browser/ui/views/user_education/browser_user_education_service_browsertest.cc
index 3677ac1..2a93b488 100644
--- a/chrome/browser/ui/views/user_education/browser_user_education_service_browsertest.cc
+++ b/chrome/browser/ui/views/user_education/browser_user_education_service_browsertest.cc
@@ -31,9 +31,9 @@
#include "components/feature_engagement/public/feature_list.h"
#include "components/feature_engagement/public/tracker.h"
#include "components/feature_engagement/test/scoped_iph_feature_list.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/tutorial_identifier.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
#include "components/user_education/common/user_education_features.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -634,7 +634,7 @@
// grace period.
auto& storage_service =
UserEducationServiceFactory::GetForBrowserContext(browser()->profile())
- ->feature_promo_storage_service();
+ ->user_education_storage_service();
storage_service.set_profile_creation_time_for_testing(
storage_service.GetCurrentTime() - base::Days(365));
}
diff --git a/chrome/browser/ui/views/user_education/browser_user_education_service_interactive_uitest.cc b/chrome/browser/ui/views/user_education/browser_user_education_service_interactive_uitest.cc
index 7253781e..1580bc9 100644
--- a/chrome/browser/ui/views/user_education/browser_user_education_service_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/browser_user_education_service_interactive_uitest.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/interaction/element_identifier.h"
diff --git a/chrome/browser/ui/views/user_education/browser_user_education_service_unittest.cc b/chrome/browser/ui/views/user_education/browser_user_education_service_unittest.cc
index f28e029..be2e9f04 100644
--- a/chrome/browser/ui/views/user_education/browser_user_education_service_unittest.cc
+++ b/chrome/browser/ui/views/user_education/browser_user_education_service_unittest.cc
@@ -16,8 +16,8 @@
#include "components/feature_engagement/public/configuration.h"
#include "components/feature_engagement/public/feature_configurations.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/tutorial_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
#include "components/user_education/common/user_education_metadata.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/views/user_education/feature_promo_dialog_interactive_uitest.cc b/chrome/browser/ui/views/user_education/feature_promo_dialog_interactive_uitest.cc
index 39ae129..90410613 100644
--- a/chrome/browser/ui/views/user_education/feature_promo_dialog_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/feature_promo_dialog_interactive_uitest.cc
@@ -43,9 +43,9 @@
#include "components/feature_engagement/public/feature_list.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/live_caption/caption_util.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/interaction/expect_call_in_scope.h"
diff --git a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc
index 492e20d..819a69e 100644
--- a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc
@@ -7,7 +7,6 @@
#include <sstream>
#include <utility>
-#include "build/build_config.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/functional/callback_helpers.h"
@@ -15,6 +14,7 @@
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "chrome/browser/feature_engagement/tracker_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -28,12 +28,12 @@
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/user_education_data.h"
#include "components/user_education/common/user_education_features.h"
+#include "components/user_education/common/user_education_storage_service.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/webapps/common/web_app_id.h"
@@ -246,7 +246,7 @@
browser->window()->GetFeaturePromoControllerForTesting());
}
- static user_education::FeaturePromoStorageService* GetStorageService(
+ static user_education::UserEducationStorageService* GetStorageService(
Browser* browser) {
return GetPromoController(browser)->storage_service();
}
diff --git a/chrome/browser/ui/views/user_education/help_bubble_factory_registry_interactive_uitest.cc b/chrome/browser/ui/views/user_education/help_bubble_factory_registry_interactive_uitest.cc
index 1952d17..100b656 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_factory_registry_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_factory_registry_interactive_uitest.cc
@@ -20,7 +20,7 @@
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "ui/base/interaction/element_tracker.h"
diff --git a/chrome/browser/ui/views/user_education/help_bubble_factory_views_browsertest.cc b/chrome/browser/ui/views/user_education/help_bubble_factory_views_browsertest.cc
index 034388f5..0723cd8c 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_factory_views_browsertest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_factory_views_browsertest.cc
@@ -18,8 +18,8 @@
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "ui/base/interaction/element_identifier.h"
diff --git a/chrome/browser/ui/views/user_education/help_bubble_factory_views_interactive_uitest.cc b/chrome/browser/ui/views/user_education/help_bubble_factory_views_interactive_uitest.cc
index 8dbd795..c070e575 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_factory_views_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_factory_views_interactive_uitest.cc
@@ -14,8 +14,8 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
diff --git a/chrome/browser/ui/views/user_education/help_bubble_factory_webui_interactive_uitest.cc b/chrome/browser/ui/views/user_education/help_bubble_factory_webui_interactive_uitest.cc
index b82206e..7cd50c06 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_factory_webui_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_factory_webui_interactive_uitest.cc
@@ -27,10 +27,10 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
-#include "components/user_education/common/events.h"
-#include "components/user_education/common/help_bubble.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/user_education_events.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/user_education/webui/help_bubble_handler.h"
#include "components/user_education/webui/tracked_element_webui.h"
diff --git a/chrome/browser/ui/views/user_education/help_bubble_view_interactive_uitest.cc b/chrome/browser/ui/views/user_education/help_bubble_view_interactive_uitest.cc
index aecf6ad..0c81c28a6 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_view_interactive_uitest.cc
@@ -19,10 +19,10 @@
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
-#include "components/user_education/common/help_bubble.h"
-#include "components/user_education/common/help_bubble_factory.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_delegate.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
diff --git a/chrome/browser/ui/views/user_education/help_bubble_view_timeout_unittest.cc b/chrome/browser/ui/views/user_education/help_bubble_view_timeout_unittest.cc
index c66a254..011c4335 100644
--- a/chrome/browser/ui/views/user_education/help_bubble_view_timeout_unittest.cc
+++ b/chrome/browser/ui/views/user_education/help_bubble_view_timeout_unittest.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/browser/ui/views/user_education/browser_user_education_service.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "components/user_education/views/help_bubble_view.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/widget/widget_observer.h"
diff --git a/chrome/browser/ui/views/user_education/low_usage_promo.cc b/chrome/browser/ui/views/user_education/low_usage_promo.cc
index 7867ccd..151102b 100644
--- a/chrome/browser/ui/views/user_education/low_usage_promo.cc
+++ b/chrome/browser/ui/views/user_education/low_usage_promo.cc
@@ -28,9 +28,9 @@
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/help_bubble_params.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/views/user_education/low_usage_promo.h b/chrome/browser/ui/views/user_education/low_usage_promo.h
index c8704c8..bb83e2c 100644
--- a/chrome/browser/ui/views/user_education/low_usage_promo.h
+++ b/chrome/browser/ui/views/user_education/low_usage_promo.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_LOW_USAGE_PROMO_H_
#define CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_LOW_USAGE_PROMO_H_
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
class Profile;
diff --git a/chrome/browser/ui/views/user_education/low_usage_promo_browsertest.cc b/chrome/browser/ui/views/user_education/low_usage_promo_browsertest.cc
index b98b419..239f82b 100644
--- a/chrome/browser/ui/views/user_education/low_usage_promo_browsertest.cc
+++ b/chrome/browser/ui/views/user_education/low_usage_promo_browsertest.cc
@@ -17,7 +17,7 @@
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/views/user_education/product_messaging_controller_interactive_uitest.cc b/chrome/browser/ui/views/user_education/product_messaging_controller_interactive_uitest.cc
index cf5a3c4..4635c5a 100644
--- a/chrome/browser/ui/views/user_education/product_messaging_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/product_messaging_controller_interactive_uitest.cc
@@ -14,7 +14,7 @@
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/test/scoped_iph_feature_list.h"
-#include "components/user_education/common/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
#include "components/user_education/common/product_messaging_controller.h"
#include "content/public/test/browser_test.h"
diff --git a/chrome/browser/ui/views/user_education/recent_session_observer_impl_unittest.cc b/chrome/browser/ui/views/user_education/recent_session_observer_impl_unittest.cc
index 3ace513..bf0c37a 100644
--- a/chrome/browser/ui/views/user_education/recent_session_observer_impl_unittest.cc
+++ b/chrome/browser/ui/views/user_education/recent_session_observer_impl_unittest.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/user_education/recent_session_policy.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/interaction/expect_call_in_scope.h"
diff --git a/chrome/browser/ui/views/user_education/tutorial_interactive_uitest.cc b/chrome/browser/ui/views/user_education/tutorial_interactive_uitest.cc
index 793712b..22c2ff696 100644
--- a/chrome/browser/ui/views/user_education/tutorial_interactive_uitest.cc
+++ b/chrome/browser/ui/views/user_education/tutorial_interactive_uitest.cc
@@ -23,12 +23,12 @@
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/interaction/tracked_element_webcontents.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/tutorial.h"
-#include "components/user_education/common/tutorial_description.h"
-#include "components/user_education/common/tutorial_registry.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/tutorial/tutorial.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/user_education/webui/tracked_element_webui.h"
diff --git a/chrome/browser/ui/views/user_education/views_tutorial_unittest.cc b/chrome/browser/ui/views/user_education/views_tutorial_unittest.cc
index 1b6023f..a9e2ff0 100644
--- a/chrome/browser/ui/views/user_education/views_tutorial_unittest.cc
+++ b/chrome/browser/ui/views/user_education/views_tutorial_unittest.cc
@@ -5,12 +5,12 @@
#include "base/functional/bind.h"
#include "base/test/bind.h"
#include "chrome/grit/generated_resources.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/help_bubble_params.h"
-#include "components/user_education/common/tutorial_description.h"
-#include "components/user_education/common/tutorial_identifier.h"
-#include "components/user_education/common/tutorial_registry.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_params.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/user_education/views/help_bubble_views_test_util.h"
diff --git a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc
index efc04f9..dd86b4a 100644
--- a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc
@@ -48,9 +48,9 @@
#include "chrome/browser/web_applications/web_app_ui_manager.h"
#include "chrome/browser/web_applications/web_app_uninstall_dialog_user_options.h"
#include "components/feature_engagement/public/feature_constants.h"
-#include "components/user_education/common/feature_promo_controller.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/user_education_data.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "components/webapps/browser/uninstall_result_code.h"
#include "components/webapps/common/web_app_id.h"
diff --git a/chrome/browser/ui/webui/browser_command/browser_command_handler.cc b/chrome/browser/ui/webui/browser_command/browser_command_handler.cc
index ddea1139d..1fb3524 100644
--- a/chrome/browser/ui/webui/browser_command/browser_command_handler.cc
+++ b/chrome/browser/ui/webui/browser_command/browser_command_handler.cc
@@ -31,8 +31,8 @@
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_browsing/core/common/safebrowsing_referral_methods.h"
#include "components/saved_tab_groups/public/features.h"
-#include "components/user_education/common/tutorial_identifier.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/ui_base_features.h"
diff --git a/chrome/browser/ui/webui/browser_command/browser_command_handler_unittest.cc b/chrome/browser/ui/webui/browser_command/browser_command_handler_unittest.cc
index 5ac8ea00..8aa5d7f 100644
--- a/chrome/browser/ui/webui/browser_command/browser_command_handler_unittest.cc
+++ b/chrome/browser/ui/webui/browser_command/browser_command_handler_unittest.cc
@@ -18,9 +18,9 @@
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/saved_tab_groups/public/features.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/tutorial_identifier.h"
-#include "components/user_education/common/tutorial_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc
index a62ce010..0b633c8 100644
--- a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc
+++ b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc
@@ -29,14 +29,14 @@
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "components/feature_engagement/public/tracker.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_result.h"
-#include "components/user_education/common/feature_promo_specification.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
-#include "components/user_education/common/tutorial_description.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_result.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
+#include "components/user_education/common/tutorial/tutorial_description.h"
+#include "components/user_education/common/user_education_data.h"
#include "components/user_education/common/user_education_features.h"
#include "components/user_education/common/user_education_metadata.h"
+#include "components/user_education/common/user_education_storage_service.h"
#include "components/user_education/webui/whats_new_registry.h"
#include "content/public/browser/web_ui.h"
#include "third_party/abseil-cpp/absl/strings/ascii.h"
@@ -91,11 +91,11 @@
#endif
}
-user_education::FeaturePromoStorageService* GetStorageService(
+user_education::UserEducationStorageService* GetStorageService(
Profile* profile) {
auto* const service =
UserEducationServiceFactory::GetForBrowserContext(profile);
- return service ? &service->feature_promo_storage_service() : nullptr;
+ return service ? &service->user_education_storage_service() : nullptr;
}
std::string GetPromoTypeString(
@@ -333,7 +333,7 @@
auto GetPromoData(
const user_education::FeaturePromoSpecification& spec,
- const user_education::FeaturePromoStorageService* storage_service,
+ const user_education::UserEducationStorageService* storage_service,
const feature_engagement::Tracker* tracker) {
std::vector<FeaturePromoDemoPageDataPtr> result;
if (storage_service) {
@@ -390,7 +390,7 @@
auto GetNewBadgeData(
const base::Feature& feature,
- const user_education::FeaturePromoStorageService* storage_service) {
+ const user_education::UserEducationStorageService* storage_service) {
std::vector<FeaturePromoDemoPageDataPtr> result;
const auto data = storage_service->ReadNewBadgeData(feature);
result.emplace_back(
@@ -662,7 +662,7 @@
// Create a session with start time well in the past to avoid grace period,
// and most recent active time as now to prevent a new session from
// immediately starting.
- user_education::FeaturePromoSessionData session_data;
+ user_education::UserEducationSessionData session_data;
session_data.most_recent_active_time = storage_service->GetCurrentTime();
storage_service->SaveSessionData(session_data);
diff --git a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h
index 30b87a5..6aa07289 100644
--- a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h
+++ b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h
@@ -9,7 +9,7 @@
#include "base/memory/raw_ptr.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/internals/user_education/user_education_internals.mojom.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "content/public/browser/web_ui_data_source.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc
index 3203c931..fedae5f7 100644
--- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc
+++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc
@@ -68,8 +68,8 @@
#include "components/optimization_guide/core/optimization_guide_model_executor.h"
#include "components/optimization_guide/proto/model_quality_service.pb.h"
#include "components/signin/public/base/signin_metrics.h"
-#include "components/user_education/common/tutorial_identifier.h"
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial_identifier.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
#include "ui/color/color_provider.h"
diff --git a/chrome/browser/user_education/browser_tutorial_service.h b/chrome/browser/user_education/browser_tutorial_service.h
index 4d49288..fccd042 100644
--- a/chrome/browser/user_education/browser_tutorial_service.h
+++ b/chrome/browser/user_education/browser_tutorial_service.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_USER_EDUCATION_BROWSER_TUTORIAL_SERVICE_H_
#define CHROME_BROWSER_USER_EDUCATION_BROWSER_TUTORIAL_SERVICE_H_
-#include "components/user_education/common/tutorial_service.h"
+#include "components/user_education/common/tutorial/tutorial_service.h"
namespace user_education {
class TutorialRegistry;
diff --git a/chrome/browser/user_education/browser_feature_promo_storage_service.cc b/chrome/browser/user_education/browser_user_education_storage_service.cc
similarity index 91%
rename from chrome/browser/user_education/browser_feature_promo_storage_service.cc
rename to chrome/browser/user_education/browser_user_education_storage_service.cc
index 162a544..9fb19f19 100644
--- a/chrome/browser/user_education/browser_feature_promo_storage_service.cc
+++ b/chrome/browser/user_education/browser_user_education_storage_service.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include <optional>
@@ -15,7 +15,7 @@
#include "components/prefs/pref_registry.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/scoped_user_pref_update.h"
-#include "components/user_education/common/feature_promo_data.h"
+#include "components/user_education/common/user_education_data.h"
namespace {
// Promo data will be saved as a dictionary in the PrefService of a profile.
@@ -149,17 +149,17 @@
default;
RecentSessionData::~RecentSessionData() = default;
-BrowserFeaturePromoStorageService::BrowserFeaturePromoStorageService(
+BrowserUserEducationStorageService::BrowserUserEducationStorageService(
Profile* profile)
: profile_(profile) {
set_profile_creation_time(profile->GetCreationTime());
}
-BrowserFeaturePromoStorageService::~BrowserFeaturePromoStorageService() =
+BrowserUserEducationStorageService::~BrowserUserEducationStorageService() =
default;
// static
-void BrowserFeaturePromoStorageService::RegisterProfilePrefs(
+void BrowserUserEducationStorageService::RegisterProfilePrefs(
PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(kIPHPromoDataPath);
registry->RegisterDictionaryPref(kNewBadgePath);
@@ -177,20 +177,20 @@
}
// static
-void BrowserFeaturePromoStorageService::ClearUsageHistory(Profile* profile) {
+void BrowserUserEducationStorageService::ClearUsageHistory(Profile* profile) {
// Recent session data stores timestamps of recent sessions in prefs, so
// should be cleared when the user clears their browsing data.
ClearRecentSessionData(*profile);
}
-void BrowserFeaturePromoStorageService::Reset(
+void BrowserUserEducationStorageService::Reset(
const base::Feature& iph_feature) {
ScopedDictPrefUpdate update(profile_->GetPrefs(), kIPHPromoDataPath);
update->RemoveByDottedPath(iph_feature.name);
}
std::optional<user_education::FeaturePromoData>
-BrowserFeaturePromoStorageService::ReadPromoData(
+BrowserUserEducationStorageService::ReadPromoData(
const base::Feature& iph_feature) const {
const std::string path_prefix = std::string(iph_feature.name) + ".";
@@ -269,7 +269,7 @@
return promo_data;
}
-void BrowserFeaturePromoStorageService::SavePromoData(
+void BrowserUserEducationStorageService::SavePromoData(
const base::Feature& iph_feature,
const user_education::FeaturePromoData& promo_data) {
std::string path_prefix = std::string(iph_feature.name) + ".";
@@ -302,23 +302,23 @@
std::move(shown_for));
}
-void BrowserFeaturePromoStorageService::ResetSession() {
+void BrowserUserEducationStorageService::ResetSession() {
auto* const prefs = profile_->GetPrefs();
prefs->ClearPref(kIPHSessionStartPath);
prefs->ClearPref(kIPHSessionLastActiveTimePath);
}
-user_education::FeaturePromoSessionData
-BrowserFeaturePromoStorageService::ReadSessionData() const {
- user_education::FeaturePromoSessionData data;
+user_education::UserEducationSessionData
+BrowserUserEducationStorageService::ReadSessionData() const {
+ user_education::UserEducationSessionData data;
auto* const prefs = profile_->GetPrefs();
data.start_time = prefs->GetTime(kIPHSessionStartPath);
data.most_recent_active_time = prefs->GetTime(kIPHSessionLastActiveTimePath);
return data;
}
-void BrowserFeaturePromoStorageService::SaveSessionData(
- const user_education::FeaturePromoSessionData& session_data) {
+void BrowserUserEducationStorageService::SaveSessionData(
+ const user_education::UserEducationSessionData& session_data) {
auto* const prefs = profile_->GetPrefs();
// Only write session start time if it has changed.
@@ -334,31 +334,31 @@
}
user_education::FeaturePromoPolicyData
-BrowserFeaturePromoStorageService::ReadPolicyData() const {
+BrowserUserEducationStorageService::ReadPolicyData() const {
user_education::FeaturePromoPolicyData data;
data.last_heavyweight_promo_time =
profile_->GetPrefs()->GetTime(kIPHPolicyLastHeavyweightPromoPath);
return data;
}
-void BrowserFeaturePromoStorageService::SavePolicyData(
+void BrowserUserEducationStorageService::SavePolicyData(
const user_education::FeaturePromoPolicyData& policy_data) {
profile_->GetPrefs()->SetTime(kIPHPolicyLastHeavyweightPromoPath,
policy_data.last_heavyweight_promo_time);
}
-void BrowserFeaturePromoStorageService::ResetPolicy() {
+void BrowserUserEducationStorageService::ResetPolicy() {
profile_->GetPrefs()->ClearPref(kIPHPolicyLastHeavyweightPromoPath);
}
-void BrowserFeaturePromoStorageService::ResetNewBadge(
+void BrowserUserEducationStorageService::ResetNewBadge(
const base::Feature& new_badge_feature) {
ScopedDictPrefUpdate update(profile_->GetPrefs(), kNewBadgePath);
update->RemoveByDottedPath(new_badge_feature.name);
}
user_education::NewBadgeData
-BrowserFeaturePromoStorageService::ReadNewBadgeData(
+BrowserUserEducationStorageService::ReadNewBadgeData(
const base::Feature& new_badge_feature) const {
const std::string path_prefix = std::string(new_badge_feature.name) + ".";
@@ -379,7 +379,7 @@
return new_badge_data;
}
-void BrowserFeaturePromoStorageService::SaveNewBadgeData(
+void BrowserUserEducationStorageService::SaveNewBadgeData(
const base::Feature& new_badge_feature,
const user_education::NewBadgeData& new_badge_data) {
std::string path_prefix = std::string(new_badge_feature.name) + ".";
@@ -397,7 +397,7 @@
}
user_education::ProductMessagingData
-BrowserFeaturePromoStorageService::ReadProductMessagingData() const {
+BrowserUserEducationStorageService::ReadProductMessagingData() const {
const auto& pref_data =
profile_->GetPrefs()->GetList(kProductMessagingShownNoticesPath);
user_education::ProductMessagingData data;
@@ -409,7 +409,7 @@
return data;
}
-void BrowserFeaturePromoStorageService::SaveProductMessagingData(
+void BrowserUserEducationStorageService::SaveProductMessagingData(
const user_education::ProductMessagingData& product_messaging_data) {
ScopedListPrefUpdate update(profile_->GetPrefs(),
kProductMessagingShownNoticesPath);
@@ -420,11 +420,11 @@
}
}
-void BrowserFeaturePromoStorageService::ResetProductMessagingData() {
+void BrowserUserEducationStorageService::ResetProductMessagingData() {
profile_->GetPrefs()->ClearPref(kProductMessagingShownNoticesPath);
}
-RecentSessionData BrowserFeaturePromoStorageService::ReadRecentSessionData()
+RecentSessionData BrowserUserEducationStorageService::ReadRecentSessionData()
const {
const auto& pref_data =
profile_->GetPrefs()->GetList(kRecentSessionStartTimesPath);
@@ -453,7 +453,7 @@
return data;
}
-void BrowserFeaturePromoStorageService::SaveRecentSessionData(
+void BrowserUserEducationStorageService::SaveRecentSessionData(
const RecentSessionData& recent_session_data) {
ScopedListPrefUpdate update(profile_->GetPrefs(),
kRecentSessionStartTimesPath);
@@ -472,6 +472,6 @@
}
}
-void BrowserFeaturePromoStorageService::ResetRecentSessionData() {
+void BrowserUserEducationStorageService::ResetRecentSessionData() {
ClearRecentSessionData(*profile_);
}
diff --git a/chrome/browser/user_education/browser_feature_promo_storage_service.h b/chrome/browser/user_education/browser_user_education_storage_service.h
similarity index 77%
rename from chrome/browser/user_education/browser_feature_promo_storage_service.h
rename to chrome/browser/user_education/browser_user_education_storage_service.h
index dcb47a16..c58bc0d 100644
--- a/chrome/browser/user_education/browser_feature_promo_storage_service.h
+++ b/chrome/browser/user_education/browser_user_education_storage_service.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_USER_EDUCATION_BROWSER_FEATURE_PROMO_STORAGE_SERVICE_H_
-#define CHROME_BROWSER_USER_EDUCATION_BROWSER_FEATURE_PROMO_STORAGE_SERVICE_H_
+#ifndef CHROME_BROWSER_USER_EDUCATION_BROWSER_USER_EDUCATION_STORAGE_SERVICE_H_
+#define CHROME_BROWSER_USER_EDUCATION_BROWSER_USER_EDUCATION_STORAGE_SERVICE_H_
#include <optional>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "components/user_education/common/user_education_data.h"
+#include "components/user_education/common/user_education_storage_service.h"
class Profile;
class PrefRegistrySimple;
@@ -40,12 +40,12 @@
const RecentSessionData& recent_session_data) = 0;
};
-class BrowserFeaturePromoStorageService
- : public user_education::FeaturePromoStorageService,
+class BrowserUserEducationStorageService
+ : public user_education::UserEducationStorageService,
public RecentSessionDataStorageService {
public:
- explicit BrowserFeaturePromoStorageService(Profile* profile);
- ~BrowserFeaturePromoStorageService() override;
+ explicit BrowserUserEducationStorageService(Profile* profile);
+ ~BrowserUserEducationStorageService() override;
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
@@ -53,7 +53,7 @@
// all of their browsing history.
static void ClearUsageHistory(Profile* profile);
- // FeaturePromoStorageService:
+ // UserEducationStorageService:
void Reset(const base::Feature& iph_feature) override;
std::optional<user_education::FeaturePromoData> ReadPromoData(
const base::Feature& iph_feature) const override;
@@ -61,9 +61,9 @@
const base::Feature& iph_feature,
const user_education::FeaturePromoData& snooze_data) override;
void ResetSession() override;
- user_education::FeaturePromoSessionData ReadSessionData() const override;
+ user_education::UserEducationSessionData ReadSessionData() const override;
void SaveSessionData(
- const user_education::FeaturePromoSessionData& session_data) override;
+ const user_education::UserEducationSessionData& session_data) override;
user_education::FeaturePromoPolicyData ReadPolicyData() const override;
void SavePolicyData(
const user_education::FeaturePromoPolicyData& policy_data) override;
@@ -90,4 +90,4 @@
const raw_ptr<Profile> profile_;
};
-#endif // CHROME_BROWSER_USER_EDUCATION_BROWSER_FEATURE_PROMO_STORAGE_SERVICE_H_
+#endif // CHROME_BROWSER_USER_EDUCATION_BROWSER_USER_EDUCATION_STORAGE_SERVICE_H_
diff --git a/chrome/browser/user_education/browser_feature_promo_storage_service_unittest.cc b/chrome/browser/user_education/browser_user_education_storage_service_unittest.cc
similarity index 85%
rename from chrome/browser/user_education/browser_feature_promo_storage_service_unittest.cc
rename to chrome/browser/user_education/browser_user_education_storage_service_unittest.cc
index 57ee9ad..3e76d22 100644
--- a/chrome/browser/user_education/browser_feature_promo_storage_service_unittest.cc
+++ b/chrome/browser/user_education/browser_user_education_storage_service_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include <memory>
@@ -16,7 +16,7 @@
#include "chrome/test/base/testing_profile.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
-#include "components/user_education/common/feature_promo_data.h"
+#include "components/user_education/common/user_education_data.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,11 +39,11 @@
constexpr base::Time kLastShownTime2 = kSessionTime + base::Minutes(75);
} // namespace
-// Repeats some of the tests in FeaturePromoStorageServiceTest except that a
+// Repeats some of the tests in UserEducationStorageServiceTest except that a
// live test profile is used to back the service instead of a dummy data map.
-class BrowserFeaturePromoStorageServiceTest : public testing::Test {
+class BrowserUserEducationStorageServiceTest : public testing::Test {
public:
- BrowserFeaturePromoStorageServiceTest()
+ BrowserUserEducationStorageServiceTest()
: task_environment_{base::test::SingleThreadTaskEnvironment::TimeSource::
MOCK_TIME},
service_{&profile_} {
@@ -100,17 +100,17 @@
void ResetSessionData() { service_.ResetSession(); }
- user_education::FeaturePromoSessionData ReadSessionData() {
+ user_education::UserEducationSessionData ReadSessionData() {
return service_.ReadSessionData();
}
void SaveSessionData(
- const user_education::FeaturePromoSessionData& session_data) {
+ const user_education::UserEducationSessionData& session_data) {
service_.SaveSessionData(session_data);
}
void CompareSessionData(
- const user_education::FeaturePromoSessionData& expected) {
+ const user_education::UserEducationSessionData& expected) {
const auto actual = ReadSessionData();
EXPECT_EQ(expected.start_time, actual.start_time);
EXPECT_EQ(expected.most_recent_active_time, actual.most_recent_active_time);
@@ -147,25 +147,25 @@
}
Profile& profile() { return profile_; }
- BrowserFeaturePromoStorageService& service() { return service_; }
+ BrowserUserEducationStorageService& service() { return service_; }
private:
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
- BrowserFeaturePromoStorageService service_;
+ BrowserUserEducationStorageService service_;
};
-TEST_F(BrowserFeaturePromoStorageServiceTest, NoDataByDefault) {
+TEST_F(BrowserUserEducationStorageServiceTest, NoDataByDefault) {
EXPECT_FALSE(ReadData(kTestIPHFeature).has_value());
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SavesAndReadsData) {
+TEST_F(BrowserUserEducationStorageServiceTest, SavesAndReadsData) {
const auto data = CreateTestData();
SaveData(kTestIPHFeature, data);
CompareData(data, kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SaveAgain) {
+TEST_F(BrowserUserEducationStorageServiceTest, SaveAgain) {
auto data = CreateTestData();
SaveData(kTestIPHFeature, data);
data.shown_for_keys.clear();
@@ -175,14 +175,14 @@
CompareData(data, kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, ResetClearsData) {
+TEST_F(BrowserUserEducationStorageServiceTest, ResetClearsData) {
const auto data = CreateTestData();
SaveData(kTestIPHFeature, data);
ResetData(kTestIPHFeature);
ASSERT_FALSE(ReadData(kTestIPHFeature).has_value());
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SavesAndReadsMultipleFeatures) {
+TEST_F(BrowserUserEducationStorageServiceTest, SavesAndReadsMultipleFeatures) {
const auto data = CreateTestData();
SaveData(kTestIPHFeature, data);
EXPECT_FALSE(ReadData(kTestIPHFeature2).has_value());
@@ -196,20 +196,20 @@
CompareData(data2, kTestIPHFeature2);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, NoSessionDataByDefault) {
- CompareSessionData(user_education::FeaturePromoSessionData());
+TEST_F(BrowserUserEducationStorageServiceTest, NoSessionDataByDefault) {
+ CompareSessionData(user_education::UserEducationSessionData());
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SavesAndReadsSessionData) {
- user_education::FeaturePromoSessionData data;
+TEST_F(BrowserUserEducationStorageServiceTest, SavesAndReadsSessionData) {
+ user_education::UserEducationSessionData data;
data.start_time = kSessionTime;
data.most_recent_active_time = kLastActiveTime;
SaveSessionData(data);
CompareSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SaveSessionAgain) {
- user_education::FeaturePromoSessionData data;
+TEST_F(BrowserUserEducationStorageServiceTest, SaveSessionAgain) {
+ user_education::UserEducationSessionData data;
data.start_time = kSessionTime;
data.most_recent_active_time = kLastActiveTime;
SaveSessionData(data);
@@ -219,20 +219,20 @@
CompareSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, ResetSessionClearsData) {
- user_education::FeaturePromoSessionData data;
+TEST_F(BrowserUserEducationStorageServiceTest, ResetSessionClearsData) {
+ user_education::UserEducationSessionData data;
data.start_time = kSessionTime;
data.most_recent_active_time = kLastActiveTime;
SaveSessionData(data);
ResetSessionData();
- CompareSessionData(user_education::FeaturePromoSessionData());
+ CompareSessionData(user_education::UserEducationSessionData());
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, NoNewBadgeDataByDefault) {
+TEST_F(BrowserUserEducationStorageServiceTest, NoNewBadgeDataByDefault) {
CompareNewBadgeData(user_education::NewBadgeData(), kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SavesAndReadsNewBadgeData) {
+TEST_F(BrowserUserEducationStorageServiceTest, SavesAndReadsNewBadgeData) {
user_education::NewBadgeData data;
data.show_count = 2;
data.used_count = 3;
@@ -241,7 +241,7 @@
CompareNewBadgeData(data, kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SavesAndClearNewBadgeData) {
+TEST_F(BrowserUserEducationStorageServiceTest, SavesAndClearNewBadgeData) {
user_education::NewBadgeData data;
data.show_count = 2;
data.used_count = 3;
@@ -251,7 +251,7 @@
CompareNewBadgeData(user_education::NewBadgeData(), kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SaveNewBadgeDataAgain) {
+TEST_F(BrowserUserEducationStorageServiceTest, SaveNewBadgeDataAgain) {
user_education::NewBadgeData data;
SaveNewBadgeData(data, kTestIPHFeature);
data.show_count = 2;
@@ -261,7 +261,7 @@
CompareNewBadgeData(data, kTestIPHFeature);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SaveMultipleNewBadgeData) {
+TEST_F(BrowserUserEducationStorageServiceTest, SaveMultipleNewBadgeData) {
user_education::NewBadgeData data;
data.show_count = 2;
data.used_count = 3;
@@ -277,7 +277,8 @@
CompareNewBadgeData(data2, kTestIPHFeature2);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, SaveAndRestoreRecentSessionData) {
+TEST_F(BrowserUserEducationStorageServiceTest,
+ SaveAndRestoreRecentSessionData) {
CompareRecentSessionData(RecentSessionData());
RecentSessionData data;
data.enabled_time = base::Time::FromSecondsSinceUnixEpoch(10);
@@ -291,7 +292,7 @@
CompareRecentSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest,
+TEST_F(BrowserUserEducationStorageServiceTest,
SaveRecentSessionDataMultipleTimes) {
CompareRecentSessionData(RecentSessionData());
RecentSessionData data;
@@ -322,7 +323,7 @@
CompareRecentSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest,
+TEST_F(BrowserUserEducationStorageServiceTest,
SaveAndRestoreRecentSessionData_NoEnabledTime) {
CompareRecentSessionData(RecentSessionData());
RecentSessionData data;
@@ -334,7 +335,7 @@
CompareRecentSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest,
+TEST_F(BrowserUserEducationStorageServiceTest,
SaveAndRestoreRecentSessionData_ElidesOutOfOrderEntries) {
RecentSessionData data;
data.enabled_time = base::Time::FromSecondsSinceUnixEpoch(10);
@@ -355,7 +356,7 @@
CompareRecentSessionData(data);
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, ResetRecentSessionData) {
+TEST_F(BrowserUserEducationStorageServiceTest, ResetRecentSessionData) {
RecentSessionData data;
data.enabled_time = base::Time::FromSecondsSinceUnixEpoch(10);
data.recent_session_start_times = {
@@ -369,7 +370,7 @@
CompareRecentSessionData(RecentSessionData());
}
-TEST_F(BrowserFeaturePromoStorageServiceTest, LegacyDataTest) {
+TEST_F(BrowserUserEducationStorageServiceTest, LegacyDataTest) {
static constexpr base::Time kLastSnoozeTime = kSessionTime - base::Days(30);
{
diff --git a/chrome/browser/user_education/recent_session_tracker.cc b/chrome/browser/user_education/recent_session_tracker.cc
index 49d9e80..0eba6dc 100644
--- a/chrome/browser/user_education/recent_session_tracker.cc
+++ b/chrome/browser/user_education/recent_session_tracker.cc
@@ -9,14 +9,14 @@
#include "base/callback_list.h"
#include "base/time/time.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
+#include "components/user_education/common/user_education_data.h"
+#include "components/user_education/common/user_education_storage_service.h"
RecentSessionTracker::RecentSessionTracker(
- user_education::FeaturePromoSessionProvider& session_provider,
- user_education::FeaturePromoStorageService& feature_promo_storage,
+ user_education::UserEducationSessionProvider& session_provider,
+ user_education::UserEducationStorageService& feature_promo_storage,
RecentSessionDataStorageService& recent_session_storage)
: subscription_(session_provider.AddNewSessionCallback(
base::BindRepeating(&RecentSessionTracker::OnSessionStart,
@@ -43,7 +43,7 @@
if (!recent_session_data_) {
recent_session_data_ = recent_session_storage_->ReadRecentSessionData();
}
- const user_education::FeaturePromoSessionData session =
+ const user_education::UserEducationSessionData session =
feature_promo_storage_->ReadSessionData();
CHECK(!session.start_time.is_null())
<< "This method should only be called when a new session starts; "
diff --git a/chrome/browser/user_education/recent_session_tracker.h b/chrome/browser/user_education/recent_session_tracker.h
index de26faff..9dbfdbd1 100644
--- a/chrome/browser/user_education/recent_session_tracker.h
+++ b/chrome/browser/user_education/recent_session_tracker.h
@@ -11,16 +11,16 @@
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ref.h"
#include "base/time/time.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
+#include "components/user_education/common/user_education_storage_service.h"
// Tracks recent sessions by the current user on this device.
// Used to help understand usage across populations and to provide additional
// input for user education experience triggers.
//
// Data is stored in `RecentSessionDataStorageService`, which is typically part
-// of `BrowserFeaturePromoStorageService`.
+// of `BrowserUserEducationStorageService`.
class RecentSessionTracker {
public:
static constexpr int kMaxRecentSessionRecords = 30;
@@ -31,8 +31,8 @@
base::RepeatingCallback<void(const RecentSessionData&)>;
RecentSessionTracker(
- user_education::FeaturePromoSessionProvider& session_provider,
- user_education::FeaturePromoStorageService& feature_promo_storage,
+ user_education::UserEducationSessionProvider& session_provider,
+ user_education::UserEducationStorageService& feature_promo_storage,
RecentSessionDataStorageService& recent_session_storage);
RecentSessionTracker(const RecentSessionTracker&) = delete;
void operator=(const RecentSessionTracker&) = delete;
@@ -54,7 +54,7 @@
void OnSessionStart();
const base::CallbackListSubscription subscription_;
- const raw_ref<user_education::FeaturePromoStorageService>
+ const raw_ref<user_education::UserEducationStorageService>
feature_promo_storage_;
const raw_ref<RecentSessionDataStorageService> recent_session_storage_;
base::RepeatingCallbackList<RecentSessionsUpdatedCallback::RunType>
diff --git a/chrome/browser/user_education/recent_session_tracker_unittest.cc b/chrome/browser/user_education/recent_session_tracker_unittest.cc
index 8f5cdbc..2093e14 100644
--- a/chrome/browser/user_education/recent_session_tracker_unittest.cc
+++ b/chrome/browser/user_education/recent_session_tracker_unittest.cc
@@ -13,11 +13,11 @@
#include "base/test/bind.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
-#include "components/user_education/common/feature_promo_data.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
-#include "components/user_education/test/test_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
+#include "components/user_education/common/user_education_data.h"
+#include "components/user_education/common/user_education_storage_service.h"
+#include "components/user_education/test/test_user_education_storage_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,10 +28,10 @@
// Short-circuits all of the functionality of the session manager except for
// updating session data and sending notifications.
class FakeSessionManager
- : protected user_education::FeaturePromoSessionManager {
+ : protected user_education::UserEducationSessionManager {
public:
explicit FakeSessionManager(
- user_education::FeaturePromoStorageService& storage_service)
+ user_education::UserEducationStorageService& storage_service)
: storage_service_(storage_service) {}
~FakeSessionManager() override = default;
@@ -40,7 +40,7 @@
void SimulateNewSession() {
const auto old_session = storage_service_->ReadSessionData();
const auto now = storage_service_->GetCurrentTime();
- user_education::FeaturePromoSessionData new_session;
+ user_education::UserEducationSessionData new_session;
new_session.most_recent_active_time = now;
new_session.start_time = now;
storage_service_->SaveSessionData(new_session);
@@ -48,18 +48,18 @@
now);
}
- user_education::FeaturePromoSessionManager& AsSessionManager() {
- return *static_cast<user_education::FeaturePromoSessionManager*>(this);
+ user_education::UserEducationSessionManager& AsSessionManager() {
+ return *static_cast<user_education::UserEducationSessionManager*>(this);
}
private:
- const raw_ref<user_education::FeaturePromoStorageService> storage_service_;
+ const raw_ref<user_education::UserEducationStorageService> storage_service_;
};
// Implementation of `RecentSessionDataStorageService` that extends
-// `TestFeaturePromoStorageService` with in-memory data storage.
+// `TestUserEducationStorageService` with in-memory data storage.
class TestBrowserStorageService
- : public user_education::test::TestFeaturePromoStorageService,
+ : public user_education::test::TestUserEducationStorageService,
public RecentSessionDataStorageService {
public:
TestBrowserStorageService() = default;
diff --git a/chrome/browser/user_education/user_education_configuration_provider.cc b/chrome/browser/user_education/user_education_configuration_provider.cc
index 933373b..d1388d6e 100644
--- a/chrome/browser/user_education/user_education_configuration_provider.cc
+++ b/chrome/browser/user_education/user_education_configuration_provider.cc
@@ -8,8 +8,8 @@
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "components/feature_engagement/public/configuration.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "components/user_education/common/user_education_features.h"
namespace {
diff --git a/chrome/browser/user_education/user_education_configuration_provider.h b/chrome/browser/user_education/user_education_configuration_provider.h
index 257cb7e..f10f7035 100644
--- a/chrome/browser/user_education/user_education_configuration_provider.h
+++ b/chrome/browser/user_education/user_education_configuration_provider.h
@@ -11,7 +11,7 @@
#include "components/feature_engagement/public/configuration_provider.h"
#include "components/feature_engagement/public/feature_list.h"
#include "components/feature_engagement/public/group_list.h"
-#include "components/user_education/common/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
// Provides feature engagement configuration based on IPH registered in the
// browser.
diff --git a/chrome/browser/user_education/user_education_configuration_provider_unittest.cc b/chrome/browser/user_education/user_education_configuration_provider_unittest.cc
index b674a5f..da3282a 100644
--- a/chrome/browser/user_education/user_education_configuration_provider_unittest.cc
+++ b/chrome/browser/user_education/user_education_configuration_provider_unittest.cc
@@ -18,9 +18,9 @@
#include "components/feature_engagement/public/group_list.h"
#include "components/feature_engagement/public/tracker.h"
#include "components/strings/grit/components_strings.h"
-#include "components/user_education/common/feature_promo_handle.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_specification.h"
+#include "components/user_education/common/feature_promo/feature_promo_handle.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/feature_promo/feature_promo_specification.h"
#include "components/user_education/common/user_education_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/user_education/user_education_service.cc b/chrome/browser/user_education/user_education_service.cc
index ccda496..7eb59297 100644
--- a/chrome/browser/user_education/user_education_service.cc
+++ b/chrome/browser/user_education/user_education_service.cc
@@ -13,36 +13,37 @@
#include "chrome/browser/user_education/recent_session_tracker.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "components/feature_engagement/public/tracker.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_session_policy.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
-#include "components/user_education/common/new_badge_controller.h"
-#include "components/user_education/common/new_badge_policy.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
+#include "components/user_education/common/new_badge/new_badge_policy.h"
+#include "components/user_education/common/session/user_education_session_policy.h"
#include "components/user_education/common/user_education_features.h"
+#include "components/user_education/common/user_education_storage_service.h"
BASE_FEATURE(kAllowRecentSessionTracking,
"AllowRecentSessionTracking",
base::FEATURE_ENABLED_BY_DEFAULT);
UserEducationService::UserEducationService(
- std::unique_ptr<BrowserFeaturePromoStorageService> storage_service,
+ std::unique_ptr<BrowserUserEducationStorageService> storage_service,
bool allows_promos)
: tutorial_service_(&tutorial_registry_, &help_bubble_factory_registry_),
- feature_promo_storage_service_(std::move(storage_service)),
- feature_promo_session_policy_(
+ user_education_storage_service_(std::move(storage_service)),
+ user_education_session_policy_(
user_education::features::IsUserEducationV2()
- ? std::make_unique<user_education::FeaturePromoSessionPolicyV2>()
- : std::make_unique<user_education::FeaturePromoSessionPolicy>()) {
- feature_promo_session_policy_->Init(&feature_promo_session_manager_,
- feature_promo_storage_service_.get());
- product_messaging_controller_.Init(feature_promo_session_manager_,
- *feature_promo_storage_service_);
+ ? std::make_unique<user_education::UserEducationSessionPolicyV2>()
+ : std::make_unique<
+ user_education::UserEducationSessionPolicy>()) {
+ user_education_session_policy_->Init(&user_education_session_manager_,
+ user_education_storage_service_.get());
+ product_messaging_controller_.Init(user_education_session_manager_,
+ *user_education_storage_service_);
if (allows_promos) {
new_badge_registry_ = std::make_unique<user_education::NewBadgeRegistry>();
new_badge_controller_ =
std::make_unique<user_education::NewBadgeController>(
- *new_badge_registry_, *feature_promo_storage_service_,
+ *new_badge_registry_, *user_education_storage_service_,
std::make_unique<user_education::NewBadgePolicy>());
}
@@ -50,11 +51,11 @@
// Only create the recent session tracker if recent session tracking is
// allowed (default).
recent_session_tracker_ = std::make_unique<RecentSessionTracker>(
- feature_promo_session_manager_, *feature_promo_storage_service_,
- *feature_promo_storage_service_);
+ user_education_session_manager_, *user_education_storage_service_,
+ *user_education_storage_service_);
} else {
// If the feature is disabled, ensure that we clear any old data.
- feature_promo_storage_service_->ResetRecentSessionData();
+ user_education_storage_service_->ResetRecentSessionData();
}
}
diff --git a/chrome/browser/user_education/user_education_service.h b/chrome/browser/user_education/user_education_service.h
index 07393f1a..b753669 100644
--- a/chrome/browser/user_education/user_education_service.h
+++ b/chrome/browser/user_education/user_education_service.h
@@ -8,20 +8,20 @@
#include <memory>
#include "base/feature_list.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
#include "chrome/browser/user_education/browser_tutorial_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/recent_session_observer.h"
#include "chrome/browser/user_education/recent_session_tracker.h"
#include "components/keyed_service/core/keyed_service.h"
-#include "components/user_education/common/feature_promo_registry.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
-#include "components/user_education/common/feature_promo_session_policy.h"
-#include "components/user_education/common/feature_promo_storage_service.h"
-#include "components/user_education/common/help_bubble_factory_registry.h"
-#include "components/user_education/common/new_badge_controller.h"
+#include "components/user_education/common/feature_promo/feature_promo_registry.h"
+#include "components/user_education/common/help_bubble/help_bubble_factory_registry.h"
+#include "components/user_education/common/new_badge/new_badge_controller.h"
#include "components/user_education/common/product_messaging_controller.h"
-#include "components/user_education/common/tutorial.h"
-#include "components/user_education/common/tutorial_registry.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
+#include "components/user_education/common/session/user_education_session_policy.h"
+#include "components/user_education/common/tutorial/tutorial.h"
+#include "components/user_education/common/tutorial/tutorial_registry.h"
+#include "components/user_education/common/user_education_storage_service.h"
#include "content/public/browser/browser_context.h"
// Kill switch for recent session tracking. Enabled by default.
@@ -30,7 +30,7 @@
class UserEducationService : public KeyedService {
public:
explicit UserEducationService(
- std::unique_ptr<BrowserFeaturePromoStorageService> storage_service,
+ std::unique_ptr<BrowserUserEducationStorageService> storage_service,
bool allows_promos);
~UserEducationService() override;
@@ -49,14 +49,16 @@
user_education::ProductMessagingController& product_messaging_controller() {
return product_messaging_controller_;
}
- user_education::FeaturePromoStorageService& feature_promo_storage_service() {
- return *feature_promo_storage_service_;
+ user_education::UserEducationStorageService&
+ user_education_storage_service() {
+ return *user_education_storage_service_;
}
- user_education::FeaturePromoSessionManager& feature_promo_session_manager() {
- return feature_promo_session_manager_;
+ user_education::UserEducationSessionManager&
+ user_education_session_manager() {
+ return user_education_session_manager_;
}
- user_education::FeaturePromoSessionPolicy& feature_promo_session_policy() {
- return *feature_promo_session_policy_;
+ user_education::UserEducationSessionPolicy& user_education_session_policy() {
+ return *user_education_session_policy_;
}
user_education::NewBadgeRegistry* new_badge_registry() {
return new_badge_registry_.get();
@@ -92,11 +94,11 @@
user_education::HelpBubbleFactoryRegistry help_bubble_factory_registry_;
user_education::FeaturePromoRegistry feature_promo_registry_;
BrowserTutorialService tutorial_service_;
- std::unique_ptr<BrowserFeaturePromoStorageService>
- feature_promo_storage_service_;
- user_education::FeaturePromoSessionManager feature_promo_session_manager_;
- std::unique_ptr<user_education::FeaturePromoSessionPolicy>
- feature_promo_session_policy_;
+ std::unique_ptr<BrowserUserEducationStorageService>
+ user_education_storage_service_;
+ user_education::UserEducationSessionManager user_education_session_manager_;
+ std::unique_ptr<user_education::UserEducationSessionPolicy>
+ user_education_session_policy_;
user_education::ProductMessagingController product_messaging_controller_;
std::unique_ptr<user_education::NewBadgeRegistry> new_badge_registry_;
std::unique_ptr<user_education::NewBadgeController> new_badge_controller_;
diff --git a/chrome/browser/user_education/user_education_service_factory.cc b/chrome/browser/user_education/user_education_service_factory.cc
index 92d4f36..49b86954 100644
--- a/chrome/browser/user_education/user_education_service_factory.cc
+++ b/chrome/browser/user_education/user_education_service_factory.cc
@@ -12,12 +12,12 @@
#include "chrome/browser/headless/headless_mode_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profiles_state.h"
-#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
+#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "components/user_education/common/feature_promo_idle_observer.h"
-#include "components/user_education/common/feature_promo_idle_policy.h"
-#include "components/user_education/common/feature_promo_session_manager.h"
+#include "components/user_education/common/session/user_education_idle_observer.h"
+#include "components/user_education/common/session/user_education_idle_policy.h"
+#include "components/user_education/common/session/user_education_session_manager.h"
#include "content/public/browser/browser_context.h"
#if BUILDFLAG(IS_CHROMEOS)
@@ -27,12 +27,12 @@
namespace {
// Idle observer that doesn't do anything.
-class StubIdleObserver : public user_education::FeaturePromoIdleObserver {
+class StubIdleObserver : public user_education::UserEducationIdleObserver {
public:
StubIdleObserver() = default;
~StubIdleObserver() override = default;
- // FeaturePromoIdleObserver:
+ // UserEducationIdleObserver:
std::optional<base::Time> MaybeGetNewLastActiveTime() const override {
return std::nullopt;
}
@@ -42,7 +42,7 @@
// These are found in chrome/browser/ui/user_education, so extern the factory
// methods to create the necessary objects.
-extern std::unique_ptr<user_education::FeaturePromoIdleObserver>
+extern std::unique_ptr<user_education::UserEducationIdleObserver>
CreatePollingIdleObserver();
extern std::unique_ptr<RecentSessionObserver> CreateRecentSessionObserver(
Profile& profile);
@@ -87,15 +87,15 @@
// Create the user education service.
auto result = std::make_unique<UserEducationService>(
- std::make_unique<BrowserFeaturePromoStorageService>(profile),
+ std::make_unique<BrowserUserEducationStorageService>(profile),
ProfileAllowsUserEducation(profile));
// Set up the session manager.
- result->feature_promo_session_manager().Init(
- &result->feature_promo_storage_service(),
+ result->user_education_session_manager().Init(
+ &result->user_education_storage_service(),
disable_idle_polling ? std::make_unique<StubIdleObserver>()
: CreatePollingIdleObserver(),
- std::make_unique<user_education::FeaturePromoIdlePolicy>());
+ std::make_unique<user_education::UserEducationIdlePolicy>());
// Possibly install a session observer. This isn't public, since it's
// self-contained and mostly for tracking state.
diff --git a/chrome/browser/webapps/installable/ml_promotion_browsertest.cc b/chrome/browser/webapps/installable/ml_promotion_browsertest.cc
index 762e6dc..0231902 100644
--- a/chrome/browser/webapps/installable/ml_promotion_browsertest.cc
+++ b/chrome/browser/webapps/installable/ml_promotion_browsertest.cc
@@ -36,7 +36,7 @@
#include "components/segmentation_platform/public/trigger.h"
#include "components/segmentation_platform/public/types/processed_value.h"
#include "components/ukm/test_ukm_recorder.h"
-#include "components/user_education/common/feature_promo_data.h"
+#include "components/user_education/common/user_education_data.h"
#include "components/user_education/common/user_education_features.h"
#include "components/webapps/browser/features.h"
#include "components/webapps/browser/installable/installable_metrics.h"
@@ -198,12 +198,12 @@
void SetUserEducationSessionStartTime(base::Time time) {
UserEducationService* edu_service =
UserEducationServiceFactory::GetForBrowserContext(profile());
- user_education::FeaturePromoSessionData session_data;
+ user_education::UserEducationSessionData session_data;
session_data.start_time = time;
session_data.most_recent_active_time = base::Time::Now();
- edu_service->feature_promo_storage_service()
+ edu_service->user_education_storage_service()
.set_profile_creation_time_for_testing(time);
- edu_service->feature_promo_storage_service().SaveSessionData(session_data);
+ edu_service->user_education_storage_service().SaveSessionData(session_data);
}
GURL GetUrlWithFaviconsNoManifest() {
diff --git a/chrome/browser/webapps/webapps_client_desktop.cc b/chrome/browser/webapps/webapps_client_desktop.cc
index f772095c3..6ea43e6 100644
--- a/chrome/browser/webapps/webapps_client_desktop.cc
+++ b/chrome/browser/webapps/webapps_client_desktop.cc
@@ -203,11 +203,11 @@
UserEducationService* const user_education_service =
UserEducationServiceFactory::GetForBrowserContext(profile);
user_education::FeaturePromoResult synthetic_result =
- user_education_service->feature_promo_session_policy().CanShowPromo(
+ user_education_service->user_education_session_policy().CanShowPromo(
{.weight =
- user_education::FeaturePromoSessionPolicy::PromoWeight::kHeavy,
+ user_education::UserEducationSessionPolicy::PromoWeight::kHeavy,
.priority =
- user_education::FeaturePromoSessionPolicy::PromoPriority::kLow},
+ user_education::UserEducationSessionPolicy::PromoPriority::kLow},
/*currently_showing=*/std::nullopt);
return synthetic_result.failure() ==
user_education::FeaturePromoResult::kBlockedByGracePeriod;