Migrate //chromeos/ash/services/assistant to namespace ash [2/N]
This CL migrates public/cpp to namespace ash from chromeos. To avoid
conflicts with internal sources, this CL has temporary 'using'
declarations.
This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.
Change-Id: I4e406d2a446c0bfe9f24fdfe9f3feab9e6026eff
Bug: 1164001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3789017
Reviewed-by: Tao Wu <[email protected]>
Commit-Queue: Yeunjoo Choi <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Owners-Override: Hidehiko Abe <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1030408}
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc
index 228a24c..66b3301 100644
--- a/ash/accelerators/accelerator_controller_impl.cc
+++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -1002,7 +1002,7 @@
base::UserMetricsAction("VoiceInteraction.Started.Assistant"));
}
- using chromeos::assistant::AssistantAllowedState;
+ using assistant::AssistantAllowedState;
switch (AssistantState::Get()->allowed_state().value_or(
AssistantAllowedState::ALLOWED)) {
case AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER:
@@ -1057,8 +1057,8 @@
}
AssistantUiController::Get()->ToggleUi(
- /*entry_point=*/chromeos::assistant::AssistantEntryPoint::kHotkey,
- /*exit_point=*/chromeos::assistant::AssistantExitPoint::kHotkey);
+ /*entry_point=*/assistant::AssistantEntryPoint::kHotkey,
+ /*exit_point=*/assistant::AssistantExitPoint::kHotkey);
}
void HandleSuspend() {
diff --git a/ash/app_list/app_list_bubble_presenter.cc b/ash/app_list/app_list_bubble_presenter.cc
index 26a199f..e35288a 100644
--- a/ash/app_list/app_list_bubble_presenter.cc
+++ b/ash/app_list/app_list_bubble_presenter.cc
@@ -47,7 +47,7 @@
namespace ash {
namespace {
-using chromeos::assistant::AssistantExitPoint;
+using assistant::AssistantExitPoint;
// Maximum amount of time to spend refreshing zero state search results before
// opening the launcher.
diff --git a/ash/app_list/app_list_controller_impl.cc b/ash/app_list/app_list_controller_impl.cc
index 18f4ce0..e938dcd9 100644
--- a/ash/app_list/app_list_controller_impl.cc
+++ b/ash/app_list/app_list_controller_impl.cc
@@ -83,8 +83,8 @@
namespace ash {
-using chromeos::assistant::AssistantEntryPoint;
-using chromeos::assistant::AssistantExitPoint;
+using assistant::AssistantEntryPoint;
+using assistant::AssistantExitPoint;
namespace {
@@ -982,7 +982,7 @@
}
void AppListControllerImpl::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {
+ assistant::AssistantStatus status) {
UpdateAssistantVisibility();
}
@@ -991,7 +991,7 @@
}
void AppListControllerImpl::OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) {
+ assistant::AssistantAllowedState state) {
UpdateAssistantVisibility();
}
@@ -1525,10 +1525,8 @@
auto* state = AssistantState::Get();
return state->settings_enabled().value_or(false) &&
- state->allowed_state() ==
- chromeos::assistant::AssistantAllowedState::ALLOWED &&
- state->assistant_status() !=
- chromeos::assistant::AssistantStatus::NOT_READY;
+ state->allowed_state() == assistant::AssistantAllowedState::ALLOWED &&
+ state->assistant_status() != assistant::AssistantStatus::NOT_READY;
}
bool AppListControllerImpl::ShouldShowSuggestedContentInfo() const {
diff --git a/ash/app_list/app_list_controller_impl.h b/ash/app_list/app_list_controller_impl.h
index 167380d..d494afb 100644
--- a/ash/app_list/app_list_controller_impl.h
+++ b/ash/app_list/app_list_controller_impl.h
@@ -250,11 +250,10 @@
void OnWallpaperPreviewEnded() override;
// AssistantStateObserver:
- void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override;
+ void OnAssistantStatusChanged(assistant::AssistantStatus status) override;
void OnAssistantSettingsEnabled(bool enabled) override;
void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) override;
+ assistant::AssistantAllowedState state) override;
// WindowTreeHostManager::Observer:
void OnDisplayConfigurationChanged() override;
diff --git a/ash/app_list/app_list_controller_impl_unittest.cc b/ash/app_list/app_list_controller_impl_unittest.cc
index 80d1417..dbf2e64 100644
--- a/ash/app_list/app_list_controller_impl_unittest.cc
+++ b/ash/app_list/app_list_controller_impl_unittest.cc
@@ -1780,9 +1780,9 @@
assistant_test_api_->SetAssistantEnabled(true);
assistant_test_api_->GetAssistantState()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ assistant::AssistantAllowedState::ALLOWED);
assistant_test_api_->GetAssistantState()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantStatus::READY);
assistant_test_api_->WaitUntilIdle();
}
diff --git a/ash/app_list/app_list_presenter_impl.cc b/ash/app_list/app_list_presenter_impl.cc
index 055a0b8d..f84aa1a 100644
--- a/ash/app_list/app_list_presenter_impl.cc
+++ b/ash/app_list/app_list_presenter_impl.cc
@@ -51,7 +51,7 @@
namespace ash {
namespace {
-using chromeos::assistant::AssistantExitPoint;
+using assistant::AssistantExitPoint;
inline ui::Layer* GetLayer(views::Widget* widget) {
return widget->GetNativeView()->layer();
diff --git a/ash/app_list/views/app_list_bubble_view_unittest.cc b/ash/app_list/views/app_list_bubble_view_unittest.cc
index 96337235..de1a671 100644
--- a/ash/app_list/views/app_list_bubble_view_unittest.cc
+++ b/ash/app_list/views/app_list_bubble_view_unittest.cc
@@ -505,7 +505,7 @@
// Simulate the app list being closed by taking a screenshot with assistant.
// This makes AppListControllerImpl::ShouldDismissImmediately() return true.
AssistantUiController::Get()->ToggleUi(
- absl::nullopt, chromeos::assistant::AssistantExitPoint::kScreenshot);
+ absl::nullopt, assistant::AssistantExitPoint::kScreenshot);
// The bubble dismissed immediately so it is not animating.
ui::Layer* bubble_layer = GetAppListTestHelper()->GetBubbleView()->layer();
diff --git a/ash/app_list/views/assistant/assistant_page_view_unittest.cc b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
index 84dc1f5..c7b7450 100644
--- a/ash/app_list/views/assistant/assistant_page_view_unittest.cc
+++ b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
@@ -244,7 +244,7 @@
// Counts the number of Assistant interactions that are started.
class AssistantInteractionCounter
- : private chromeos::assistant::AssistantInteractionSubscriber {
+ : private assistant::AssistantInteractionSubscriber {
public:
explicit AssistantInteractionCounter(
chromeos::assistant::Assistant* service) {
@@ -264,8 +264,7 @@
}
int interaction_count_ = 0;
- chromeos::assistant::ScopedAssistantInteractionSubscriber
- interaction_observer_{this};
+ assistant::ScopedAssistantInteractionSubscriber interaction_observer_{this};
};
TEST_F(AssistantPageNonBubbleTest, ShouldStartInPeekingState) {
diff --git a/ash/app_list/views/assistant/assistant_test_api_impl.cc b/ash/app_list/views/assistant/assistant_test_api_impl.cc
index f4d317f3..9d2bba4 100644
--- a/ash/app_list/views/assistant/assistant_test_api_impl.cc
+++ b/ash/app_list/views/assistant/assistant_test_api_impl.cc
@@ -143,15 +143,14 @@
void AssistantTestApiImpl::EnableAssistantAndWait() {
SetAssistantEnabled(true);
GetAssistantState()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
- GetAssistantState()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantAllowedState::ALLOWED);
+ GetAssistantState()->NotifyStatusChanged(assistant::AssistantStatus::READY);
WaitUntilIdle();
}
void AssistantTestApiImpl::SetAssistantEnabled(bool enabled) {
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetBoolean(
- chromeos::assistant::prefs::kAssistantEnabled, enabled);
+ assistant::prefs::kAssistantEnabled, enabled);
// Ensure the value has taken effect.
ASSERT_EQ(GetAssistantState()->settings_enabled(), enabled)
@@ -162,7 +161,7 @@
void AssistantTestApiImpl::SetScreenContextEnabled(bool enabled) {
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetBoolean(
- chromeos::assistant::prefs::kAssistantContextEnabled, enabled);
+ assistant::prefs::kAssistantContextEnabled, enabled);
// Ensure the value has taken effect.
ASSERT_EQ(GetAssistantState()->context_enabled(), enabled)
@@ -181,9 +180,9 @@
}
void AssistantTestApiImpl::SetConsentStatus(
- chromeos::assistant::prefs::ConsentStatus consent_status) {
+ assistant::prefs::ConsentStatus consent_status) {
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetInteger(
- chromeos::assistant::prefs::kAssistantConsentStatus, consent_status);
+ assistant::prefs::kAssistantConsentStatus, consent_status);
// Ensure the value has taken effect.
ASSERT_EQ(GetAssistantState()->consent_status(), consent_status)
@@ -199,10 +198,10 @@
}
void AssistantTestApiImpl::SetOnboardingMode(
- chromeos::assistant::prefs::AssistantOnboardingMode onboarding_mode) {
+ assistant::prefs::AssistantOnboardingMode onboarding_mode) {
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetString(
- chromeos::assistant::prefs::kAssistantOnboardingMode,
- chromeos::assistant::prefs::ToOnboardingModeString(onboarding_mode));
+ assistant::prefs::kAssistantOnboardingMode,
+ assistant::prefs::ToOnboardingModeString(onboarding_mode));
// Ensure the value has taken effect.
ASSERT_EQ(GetAssistantState()->onboarding_mode(), onboarding_mode)
@@ -213,7 +212,7 @@
void AssistantTestApiImpl::SetPreferVoice(bool value) {
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetBoolean(
- chromeos::assistant::prefs::kAssistantLaunchWithMicOpen, value);
+ assistant::prefs::kAssistantLaunchWithMicOpen, value);
// Ensure the value has taken effect.
ASSERT_EQ(GetAssistantState()->launch_with_mic_open(), value)
diff --git a/ash/app_list/views/assistant/assistant_test_api_impl.h b/ash/app_list/views/assistant/assistant_test_api_impl.h
index 7ab994b..406946a 100644
--- a/ash/app_list/views/assistant/assistant_test_api_impl.h
+++ b/ash/app_list/views/assistant/assistant_test_api_impl.h
@@ -36,10 +36,9 @@
void SetAssistantEnabled(bool enable) override;
void SetScreenContextEnabled(bool enabled) override;
void SetTabletMode(bool enable) override;
- void SetConsentStatus(chromeos::assistant::prefs::ConsentStatus) override;
+ void SetConsentStatus(assistant::prefs::ConsentStatus) override;
void SetNumberOfSessionsWhereOnboardingShown(int number_of_sessions) override;
- void SetOnboardingMode(
- chromeos::assistant::prefs::AssistantOnboardingMode) override;
+ void SetOnboardingMode(assistant::prefs::AssistantOnboardingMode) override;
void SetPreferVoice(bool value) override;
void SetTimeOfLastInteraction(base::Time time) override;
void StartOverview() override;
diff --git a/ash/ash_prefs.cc b/ash/ash_prefs.cc
index 9199866..2aa3f05 100644
--- a/ash/ash_prefs.cc
+++ b/ash/ash_prefs.cc
@@ -117,7 +117,7 @@
// Provide prefs registered in the browser for ash_unittests.
if (for_test) {
- chromeos::assistant::prefs::RegisterProfilePrefs(registry);
+ assistant::prefs::RegisterProfilePrefs(registry);
quick_answers::prefs::RegisterProfilePrefs(registry);
registry->RegisterBooleanPref(prefs::kMouseReverseScroll, false);
registry->RegisterBooleanPref(prefs::kSendFunctionKeys, false);
diff --git a/ash/assistant/assistant_alarm_timer_controller_impl.cc b/ash/assistant/assistant_alarm_timer_controller_impl.cc
index dbb70ff7..7af3daba 100644
--- a/ash/assistant/assistant_alarm_timer_controller_impl.cc
+++ b/ash/assistant/assistant_alarm_timer_controller_impl.cc
@@ -293,7 +293,7 @@
}
void AssistantAlarmTimerControllerImpl::SetAssistant(
- chromeos::assistant::Assistant* assistant) {
+ assistant::Assistant* assistant) {
assistant_ = assistant;
}
@@ -361,10 +361,10 @@
}
void AssistantAlarmTimerControllerImpl::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {
+ assistant::AssistantStatus status) {
// If LibAssistant is no longer running we need to clear our cache to
// accurately reflect LibAssistant alarm/timer state.
- if (status == chromeos::assistant::AssistantStatus::NOT_READY)
+ if (status == assistant::AssistantStatus::NOT_READY)
model_.RemoveAllTimers();
}
diff --git a/ash/assistant/assistant_alarm_timer_controller_impl.h b/ash/assistant/assistant_alarm_timer_controller_impl.h
index 97a2ddc..90c0340 100644
--- a/ash/assistant/assistant_alarm_timer_controller_impl.h
+++ b/ash/assistant/assistant_alarm_timer_controller_impl.h
@@ -49,7 +49,7 @@
~AssistantAlarmTimerControllerImpl() override;
// Provides a pointer to the |assistant| owned by AssistantService.
- void SetAssistant(chromeos::assistant::Assistant* assistant);
+ void SetAssistant(assistant::Assistant* assistant);
// AssistantAlarmTimerController:
const AssistantAlarmTimerModel* GetModel() const override;
@@ -64,8 +64,7 @@
const std::map<std::string, std::string>& params) override;
// AssistantStateObserver:
- void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override;
+ void OnAssistantStatusChanged(assistant::AssistantStatus status) override;
// AssistantAlarmTimerModelObserver:
void OnTimerAdded(const chromeos::assistant::AssistantTimer& timer) override;
@@ -91,7 +90,7 @@
std::map<std::string, base::OneShotTimer> tickers_;
// Owned by AssistantService.
- chromeos::assistant::Assistant* assistant_;
+ assistant::Assistant* assistant_;
base::ScopedObservation<AssistantController, AssistantControllerObserver>
assistant_controller_observation_{this};
diff --git a/ash/assistant/assistant_controller_impl.cc b/ash/assistant/assistant_controller_impl.cc
index b4160d0..7d6de45 100644
--- a/ash/assistant/assistant_controller_impl.cc
+++ b/ash/assistant/assistant_controller_impl.cc
@@ -66,8 +66,7 @@
assistant_volume_control_receiver_.Bind(std::move(receiver));
}
-void AssistantControllerImpl::SetAssistant(
- chromeos::assistant::Assistant* assistant) {
+void AssistantControllerImpl::SetAssistant(assistant::Assistant* assistant) {
assistant_ = assistant;
// Provide reference to sub-controllers.
@@ -175,7 +174,7 @@
if (IsAndroidIntent(url)) {
android_helper->LaunchAndroidIntent(url.spec());
} else {
- chromeos::assistant::AssistantBrowserDelegate::Get()->OpenUrl(url);
+ assistant::AssistantBrowserDelegate::Get()->OpenUrl(url);
}
NotifyUrlOpened(url, from_server);
}
@@ -211,13 +210,13 @@
// Close the assistant UI so that the feedback page is visible.
assistant_ui_controller_.CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
break;
case DeepLinkType::kScreenshot:
// We close the UI before taking the screenshot as it's probably not the
// user's intention to include the Assistant in the picture.
assistant_ui_controller_.CloseUi(
- chromeos::assistant::AssistantExitPoint::kScreenshot);
+ assistant::AssistantExitPoint::kScreenshot);
CaptureModeController::Get()->CaptureScreenshotsOfAllDisplays();
break;
case DeepLinkType::kTaskManager:
@@ -326,16 +325,16 @@
}
void AssistantControllerImpl::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {
- if (status == chromeos::assistant::AssistantStatus::NOT_READY)
+ assistant::AssistantStatus status) {
+ if (status == assistant::AssistantStatus::NOT_READY)
assistant_ui_controller_.CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
}
void AssistantControllerImpl::OnLockedFullScreenStateChanged(bool enabled) {
if (enabled)
assistant_ui_controller_.CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
}
void AssistantControllerImpl::BindVolumeControl(
diff --git a/ash/assistant/assistant_controller_impl.h b/ash/assistant/assistant_controller_impl.h
index ff87c222..e724fa1 100644
--- a/ash/assistant/assistant_controller_impl.h
+++ b/ash/assistant/assistant_controller_impl.h
@@ -81,7 +81,7 @@
void OpenAssistantSettings() override;
void OpenUrl(const GURL& url, bool in_background, bool from_server) override;
base::WeakPtr<ash::AssistantController> GetWeakPtr() override;
- void SetAssistant(chromeos::assistant::Assistant* assistant) override;
+ void SetAssistant(assistant::Assistant* assistant) override;
void StartSpeakerIdEnrollmentFlow() override;
void SendAssistantFeedback(bool assistant_debug_info_allowed,
const std::string& feedback_description,
@@ -140,8 +140,7 @@
void NotifyUrlOpened(const GURL& url, bool from_server);
// AssistantStateObserver:
- void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override;
+ void OnAssistantStatusChanged(assistant::AssistantStatus status) override;
void OnLockedFullScreenStateChanged(bool enabled) override;
// AssistantInterfaceBinder implementation:
@@ -158,7 +157,7 @@
// |assistant_| can be nullptr if libassistant creation is not yet completed,
// i.e. it cannot take a request.
- chromeos::assistant::Assistant* assistant_ = nullptr;
+ assistant::Assistant* assistant_ = nullptr;
// Assistant sub-controllers.
AssistantAlarmTimerControllerImpl assistant_alarm_timer_controller_{this};
diff --git a/ash/assistant/assistant_interaction_controller_impl.cc b/ash/assistant/assistant_interaction_controller_impl.cc
index 2ce8919..fb18275 100644
--- a/ash/assistant/assistant_interaction_controller_impl.cc
+++ b/ash/assistant/assistant_interaction_controller_impl.cc
@@ -44,7 +44,7 @@
namespace {
-using chromeos::assistant::features::IsWaitSchedulingEnabled;
+using assistant::features::IsWaitSchedulingEnabled;
// Android.
constexpr char kAndroidIntentScheme[] = "intent://";
diff --git a/ash/assistant/assistant_interaction_controller_impl.h b/ash/assistant/assistant_interaction_controller_impl.h
index 6426fc0..cf1c833 100644
--- a/ash/assistant/assistant_interaction_controller_impl.h
+++ b/ash/assistant/assistant_interaction_controller_impl.h
@@ -34,7 +34,7 @@
class AssistantInteractionControllerImpl
: public AssistantInteractionController,
- public chromeos::assistant::AssistantInteractionSubscriber,
+ public assistant::AssistantInteractionSubscriber,
public AssistantControllerObserver,
public AssistantInteractionModelObserver,
public AssistantUiModelObserver,
@@ -45,7 +45,7 @@
using AssistantInteractionMetadata =
chromeos::assistant::AssistantInteractionMetadata;
using AssistantInteractionResolution =
- chromeos::assistant::AssistantInteractionResolution;
+ assistant::AssistantInteractionResolution;
using AssistantInteractionType =
chromeos::assistant::AssistantInteractionType;
using AssistantQuerySource = chromeos::assistant::AssistantQuerySource;
@@ -65,7 +65,7 @@
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
// Provides a pointer to the |assistant| owned by AssistantService.
- void SetAssistant(chromeos::assistant::Assistant* assistant);
+ void SetAssistant(assistant::Assistant* assistant);
// AssistantInteractionController:
const AssistantInteractionModel* GetModel() const override;
@@ -98,7 +98,7 @@
// HighlighterController::Observer:
void OnHighlighterSelectionRecognized(const gfx::Rect& rect) override;
- // chromeos::assistant::AssistantInteractionSubscriber:
+ // assistant::AssistantInteractionSubscriber:
void OnInteractionStarted(
const AssistantInteractionMetadata& metadata) override;
void OnInteractionFinished(
@@ -150,7 +150,7 @@
bool has_had_interaction_ = false;
// Owned by AssistantService.
- chromeos::assistant::Assistant* assistant_ = nullptr;
+ assistant::Assistant* assistant_ = nullptr;
base::ScopedObservation<AssistantController, AssistantControllerObserver>
assistant_controller_observation_{this};
diff --git a/ash/assistant/assistant_interaction_controller_impl_unittest.cc b/ash/assistant/assistant_interaction_controller_impl_unittest.cc
index 270f762..e988be84 100644
--- a/ash/assistant/assistant_interaction_controller_impl_unittest.cc
+++ b/ash/assistant/assistant_interaction_controller_impl_unittest.cc
@@ -36,16 +36,16 @@
namespace {
+using assistant::AssistantInteractionSubscriber;
+using assistant::ScopedAssistantInteractionSubscriber;
using chromeos::assistant::AndroidAppInfo;
using chromeos::assistant::Assistant;
using chromeos::assistant::AssistantInteractionMetadata;
-using chromeos::assistant::AssistantInteractionSubscriber;
using chromeos::assistant::AssistantInteractionType;
using chromeos::assistant::AssistantQuerySource;
using chromeos::assistant::AssistantSuggestion;
using chromeos::assistant::AssistantSuggestionType;
using chromeos::assistant::MockAssistantInteractionSubscriber;
-using chromeos::assistant::ScopedAssistantInteractionSubscriber;
using ::testing::Invoke;
using ::testing::Mock;
@@ -55,7 +55,7 @@
// Mocks -----------------------------------------------------------------------
class AssistantInteractionSubscriberMock
- : public chromeos::assistant::AssistantInteractionSubscriber {
+ : public AssistantInteractionSubscriber {
public:
explicit AssistantInteractionSubscriberMock(Assistant* service) {
scoped_subscriber_.Observe(service);
@@ -69,8 +69,7 @@
(override));
private:
- chromeos::assistant::ScopedAssistantInteractionSubscriber scoped_subscriber_{
- this};
+ ScopedAssistantInteractionSubscriber scoped_subscriber_{this};
};
// AssistantInteractionControllerImplTest --------------------------------------
@@ -237,7 +236,7 @@
base::RunLoop().RunUntilIdle();
interaction_controller()->OnInteractionFinished(
- chromeos::assistant::AssistantInteractionResolution::kError);
+ assistant::AssistantInteractionResolution::kError);
base::RunLoop().RunUntilIdle();
diff --git a/ash/assistant/assistant_notification_controller_impl.cc b/ash/assistant/assistant_notification_controller_impl.cc
index 77f417b..f0bc333 100644
--- a/ash/assistant/assistant_notification_controller_impl.cc
+++ b/ash/assistant/assistant_notification_controller_impl.cc
@@ -98,7 +98,7 @@
}
void AssistantNotificationControllerImpl::SetAssistant(
- chromeos::assistant::Assistant* assistant) {
+ assistant::Assistant* assistant) {
receiver_.reset();
assistant_ = assistant;
diff --git a/ash/assistant/assistant_notification_controller_impl.h b/ash/assistant/assistant_notification_controller_impl.h
index 002db1b..2cf57388 100644
--- a/ash/assistant/assistant_notification_controller_impl.h
+++ b/ash/assistant/assistant_notification_controller_impl.h
@@ -44,7 +44,7 @@
const AssistantNotificationModel* model() const { return &model_; }
// Provides a pointer to the |assistant| owned by AssistantController.
- void SetAssistant(chromeos::assistant::Assistant* assistant);
+ void SetAssistant(assistant::Assistant* assistant);
// AssistantNotificationController:
void RemoveNotificationById(const std::string& id, bool from_server) override;
@@ -79,7 +79,7 @@
AssistantNotificationExpiryMonitor expiry_monitor_;
// Owned by AssistantService
- chromeos::assistant::Assistant* assistant_ = nullptr;
+ assistant::Assistant* assistant_ = nullptr;
const message_center::NotifierId notifier_id_;
diff --git a/ash/assistant/assistant_setup_controller.cc b/ash/assistant/assistant_setup_controller.cc
index 81b14b0..6085db9 100644
--- a/ash/assistant/assistant_setup_controller.cc
+++ b/ash/assistant/assistant_setup_controller.cc
@@ -51,7 +51,7 @@
}
void AssistantSetupController::OnOptInButtonPressed() {
- using chromeos::assistant::prefs::ConsentStatus;
+ using assistant::prefs::ConsentStatus;
if (AssistantState::Get()->consent_status().value_or(
ConsentStatus::kUnknown) == ConsentStatus::kUnauthorized) {
AssistantController::Get()->OpenUrl(assistant::util::CreateLocalizedGURL(
@@ -66,8 +66,7 @@
if (!assistant_setup)
return;
- AssistantUiController::Get()->CloseUi(
- chromeos::assistant::AssistantExitPoint::kSetup);
+ AssistantUiController::Get()->CloseUi(assistant::AssistantExitPoint::kSetup);
assistant_setup->StartAssistantOptInFlow(
type, base::BindOnce(&AssistantSetupController::OnOptInFlowFinished,
@@ -78,7 +77,7 @@
bool completed) {
if (relaunch && completed) {
AssistantUiController::Get()->ShowUi(
- chromeos::assistant::AssistantEntryPoint::kSetup);
+ assistant::AssistantEntryPoint::kSetup);
}
}
diff --git a/ash/assistant/assistant_setup_controller_unittest.cc b/ash/assistant/assistant_setup_controller_unittest.cc
index 4af62f7..c0db5a03 100644
--- a/ash/assistant/assistant_setup_controller_unittest.cc
+++ b/ash/assistant/assistant_setup_controller_unittest.cc
@@ -28,7 +28,7 @@
ShowAssistantUi(AssistantEntryPoint::kUnspecified);
EXPECT_TRUE(IsVisible());
- SetConsentStatus(chromeos::assistant::prefs::ConsentStatus::kUnknown);
+ SetConsentStatus(assistant::prefs::ConsentStatus::kUnknown);
EXPECT_TRUE(opt_in_view()->GetVisible());
ClickOnAndWait(opt_in_view());
@@ -43,7 +43,7 @@
ShowAssistantUi(AssistantEntryPoint::kUnspecified);
EXPECT_TRUE(IsVisible());
- SetConsentStatus(chromeos::assistant::prefs::ConsentStatus::kUnknown);
+ SetConsentStatus(assistant::prefs::ConsentStatus::kUnknown);
EXPECT_TRUE(opt_in_view()->GetVisible());
ClickOnAndWait(opt_in_view());
@@ -56,7 +56,7 @@
ShowAssistantUi(AssistantEntryPoint::kUnspecified);
EXPECT_TRUE(IsVisible());
- SetConsentStatus(chromeos::assistant::prefs::ConsentStatus::kUnknown);
+ SetConsentStatus(assistant::prefs::ConsentStatus::kUnknown);
EXPECT_TRUE(opt_in_view()->GetVisible());
ClickOnAndWait(opt_in_view());
@@ -73,7 +73,7 @@
ShowAssistantUi(AssistantEntryPoint::kUnspecified);
EXPECT_TRUE(IsVisible());
- SetConsentStatus(chromeos::assistant::prefs::ConsentStatus::kUnknown);
+ SetConsentStatus(assistant::prefs::ConsentStatus::kUnknown);
EXPECT_TRUE(opt_in_view()->GetVisible());
ClickOnAndWait(opt_in_view());
diff --git a/ash/assistant/assistant_state_controller_unittest.cc b/ash/assistant/assistant_state_controller_unittest.cc
index 5d8744a3..74561fe4 100644
--- a/ash/assistant/assistant_state_controller_unittest.cc
+++ b/ash/assistant/assistant_state_controller_unittest.cc
@@ -18,18 +18,18 @@
namespace {
-using chromeos::assistant::prefs::AssistantOnboardingMode;
-using chromeos::assistant::prefs::ConsentStatus;
-using chromeos::assistant::prefs::kAssistantConsentStatus;
-using chromeos::assistant::prefs::kAssistantContextEnabled;
-using chromeos::assistant::prefs::kAssistantEnabled;
-using chromeos::assistant::prefs::kAssistantHotwordAlwaysOn;
-using chromeos::assistant::prefs::kAssistantHotwordEnabled;
-using chromeos::assistant::prefs::kAssistantLaunchWithMicOpen;
-using chromeos::assistant::prefs::kAssistantNotificationEnabled;
-using chromeos::assistant::prefs::kAssistantOnboardingMode;
-using chromeos::assistant::prefs::kAssistantOnboardingModeDefault;
-using chromeos::assistant::prefs::kAssistantOnboardingModeEducation;
+using assistant::prefs::AssistantOnboardingMode;
+using assistant::prefs::ConsentStatus;
+using assistant::prefs::kAssistantConsentStatus;
+using assistant::prefs::kAssistantContextEnabled;
+using assistant::prefs::kAssistantEnabled;
+using assistant::prefs::kAssistantHotwordAlwaysOn;
+using assistant::prefs::kAssistantHotwordEnabled;
+using assistant::prefs::kAssistantLaunchWithMicOpen;
+using assistant::prefs::kAssistantNotificationEnabled;
+using assistant::prefs::kAssistantOnboardingMode;
+using assistant::prefs::kAssistantOnboardingModeDefault;
+using assistant::prefs::kAssistantOnboardingModeEducation;
class TestAssistantStateObserver : public AssistantStateObserver {
public:
diff --git a/ash/assistant/assistant_suggestions_controller_impl.cc b/ash/assistant/assistant_suggestions_controller_impl.cc
index a11c87e..7a6e0ff 100644
--- a/ash/assistant/assistant_suggestions_controller_impl.cc
+++ b/ash/assistant/assistant_suggestions_controller_impl.cc
@@ -29,9 +29,9 @@
namespace {
+using assistant::prefs::AssistantOnboardingMode;
using chromeos::assistant::AssistantSuggestion;
using chromeos::assistant::AssistantSuggestionType;
-using chromeos::assistant::prefs::AssistantOnboardingMode;
// Conversation starters -------------------------------------------------------
diff --git a/ash/assistant/assistant_suggestions_controller_impl.h b/ash/assistant/assistant_suggestions_controller_impl.h
index b54f9c0f..11e804f 100644
--- a/ash/assistant/assistant_suggestions_controller_impl.h
+++ b/ash/assistant/assistant_suggestions_controller_impl.h
@@ -49,8 +49,7 @@
// AssistantStateObserver:
void OnAssistantContextEnabled(bool enabled) override;
void OnAssistantOnboardingModeChanged(
- chromeos::assistant::prefs::AssistantOnboardingMode onboarding_mode)
- override;
+ assistant::prefs::AssistantOnboardingMode onboarding_mode) override;
void UpdateConversationStarters();
void UpdateOnboardingSuggestions();
diff --git a/ash/assistant/assistant_suggestions_controller_impl_unittest.cc b/ash/assistant/assistant_suggestions_controller_impl_unittest.cc
index 41344c21..9bc0914 100644
--- a/ash/assistant/assistant_suggestions_controller_impl_unittest.cc
+++ b/ash/assistant/assistant_suggestions_controller_impl_unittest.cc
@@ -13,7 +13,7 @@
namespace {
-using chromeos::assistant::prefs::AssistantOnboardingMode;
+using assistant::prefs::AssistantOnboardingMode;
const AssistantSuggestionsModel* GetModel() {
return AssistantSuggestionsController::Get()->GetModel();
diff --git a/ash/assistant/assistant_ui_controller_impl.cc b/ash/assistant/assistant_ui_controller_impl.cc
index ff3261c9..e99c7bc 100644
--- a/ash/assistant/assistant_ui_controller_impl.cc
+++ b/ash/assistant/assistant_ui_controller_impl.cc
@@ -81,8 +81,7 @@
prefs::kAssistantNumSessionsWhereOnboardingShown, 0);
}
-void AssistantUiControllerImpl::SetAssistant(
- chromeos::assistant::Assistant* assistant) {
+void AssistantUiControllerImpl::SetAssistant(assistant::Assistant* assistant) {
assistant_ = assistant;
}
@@ -119,7 +118,7 @@
// TODO(dmblack): Show a more helpful message to the user.
if (assistant_state->assistant_status() ==
- chromeos::assistant::AssistantStatus::NOT_READY) {
+ assistant::AssistantStatus::NOT_READY) {
ShowUnboundErrorToast();
return;
}
@@ -144,7 +143,7 @@
// provided the visibility change hasn't been invalidated.
return base::ScopedClosureRunner(base::BindOnce(
[](const base::WeakPtr<AssistantUiControllerImpl>& weak_ptr,
- chromeos::assistant::AssistantExitPoint exit_point) {
+ assistant::AssistantExitPoint exit_point) {
if (weak_ptr)
weak_ptr->model_.SetClosed(exit_point);
},
diff --git a/ash/assistant/assistant_ui_controller_impl.h b/ash/assistant/assistant_ui_controller_impl.h
index 517e65c7..674cee16 100644
--- a/ash/assistant/assistant_ui_controller_impl.h
+++ b/ash/assistant/assistant_ui_controller_impl.h
@@ -54,7 +54,7 @@
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
// Provides a pointer to the |assistant| owned by AssistantService.
- void SetAssistant(chromeos::assistant::Assistant* assistant);
+ void SetAssistant(assistant::Assistant* assistant);
// AssistantUiController:
const AssistantUiModel* GetModel() const override;
@@ -102,7 +102,7 @@
bool has_shown_onboarding_ = false;
// Owned by AssistantService.
- chromeos::assistant::Assistant* assistant_ = nullptr;
+ assistant::Assistant* assistant_ = nullptr;
base::ScopedObservation<AssistantController, AssistantControllerObserver>
assistant_controller_observation_{this};
diff --git a/ash/assistant/assistant_view_delegate_impl.cc b/ash/assistant/assistant_view_delegate_impl.cc
index 0d7cf5dd..a551635 100644
--- a/ash/assistant/assistant_view_delegate_impl.cc
+++ b/ash/assistant/assistant_view_delegate_impl.cc
@@ -120,7 +120,7 @@
bool AssistantViewDelegateImpl::ShouldShowOnboarding() const {
// UI developers need to be able to force the onboarding flow.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::assistant::switches::kForceAssistantOnboarding)) {
+ assistant::switches::kForceAssistantOnboarding)) {
return true;
}
diff --git a/ash/assistant/model/assistant_ui_model.h b/ash/assistant/model/assistant_ui_model.h
index 4483d64..78b28f2 100644
--- a/ash/assistant/model/assistant_ui_model.h
+++ b/ash/assistant/model/assistant_ui_model.h
@@ -45,8 +45,8 @@
// Models the Assistant UI.
class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantUiModel {
public:
- using AssistantEntryPoint = chromeos::assistant::AssistantEntryPoint;
- using AssistantExitPoint = chromeos::assistant::AssistantExitPoint;
+ using AssistantEntryPoint = assistant::AssistantEntryPoint;
+ using AssistantExitPoint = assistant::AssistantExitPoint;
AssistantUiModel();
diff --git a/ash/assistant/model/assistant_ui_model_observer.h b/ash/assistant/model/assistant_ui_model_observer.h
index 8131cb7..42a2f6a 100644
--- a/ash/assistant/model/assistant_ui_model_observer.h
+++ b/ash/assistant/model/assistant_ui_model_observer.h
@@ -10,14 +10,12 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/gfx/geometry/rect.h"
-namespace chromeos {
+namespace ash {
+
namespace assistant {
enum class AssistantEntryPoint;
enum class AssistantExitPoint;
} // namespace assistant
-} // namespace chromeos
-
-namespace ash {
enum class AssistantVisibility;
@@ -26,8 +24,8 @@
class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantUiModelObserver
: public base::CheckedObserver {
public:
- using AssistantEntryPoint = chromeos::assistant::AssistantEntryPoint;
- using AssistantExitPoint = chromeos::assistant::AssistantExitPoint;
+ using AssistantEntryPoint = assistant::AssistantEntryPoint;
+ using AssistantExitPoint = assistant::AssistantExitPoint;
AssistantUiModelObserver(const AssistantUiModelObserver&) = delete;
AssistantUiModelObserver& operator=(const AssistantUiModelObserver&) = delete;
diff --git a/ash/assistant/test/assistant_ash_test_base.cc b/ash/assistant/test/assistant_ash_test_base.cc
index 04b9044..f2d3776 100644
--- a/ash/assistant/test/assistant_ash_test_base.cc
+++ b/ash/assistant/test/assistant_ash_test_base.cc
@@ -368,7 +368,7 @@
// Set AssistantAllowedState to ALLOWED.
test_api_->GetAssistantState()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ assistant::AssistantAllowedState::ALLOWED);
// Set user consent so the suggestion chips are displayed.
SetConsentStatus(ConsentStatus::kActivityControlAccepted);
@@ -376,7 +376,7 @@
// At this point our Assistant service is ready for use.
// Indicate this by changing status from NOT_READY to READY.
test_api_->GetAssistantState()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantStatus::READY);
}
} // namespace ash
diff --git a/ash/assistant/test/assistant_ash_test_base.h b/ash/assistant/test/assistant_ash_test_base.h
index daee313e..a110bf2 100644
--- a/ash/assistant/test/assistant_ash_test_base.h
+++ b/ash/assistant/test/assistant_ash_test_base.h
@@ -43,11 +43,10 @@
// Helper class to make testing the Assistant Ash UI easier.
class AssistantAshTestBase : public AshTestBase {
public:
- using AssistantEntryPoint = chromeos::assistant::AssistantEntryPoint;
- using AssistantExitPoint = chromeos::assistant::AssistantExitPoint;
- using AssistantOnboardingMode =
- chromeos::assistant::prefs::AssistantOnboardingMode;
- using ConsentStatus = chromeos::assistant::prefs::ConsentStatus;
+ using AssistantEntryPoint = assistant::AssistantEntryPoint;
+ using AssistantExitPoint = assistant::AssistantExitPoint;
+ using AssistantOnboardingMode = assistant::prefs::AssistantOnboardingMode;
+ using ConsentStatus = assistant::prefs::ConsentStatus;
AssistantAshTestBase();
explicit AssistantAshTestBase(base::test::TaskEnvironment::TimeSource time);
diff --git a/ash/assistant/test/test_assistant_service.cc b/ash/assistant/test/test_assistant_service.cc
index cc5c97f..ab1ccdcb 100644
--- a/ash/assistant/test/test_assistant_service.cc
+++ b/ash/assistant/test/test_assistant_service.cc
@@ -17,9 +17,9 @@
namespace ash {
+using assistant::AssistantInteractionResolution;
+using assistant::AssistantInteractionSubscriber;
using chromeos::assistant::AssistantInteractionMetadata;
-using chromeos::assistant::AssistantInteractionResolution;
-using chromeos::assistant::AssistantInteractionSubscriber;
using chromeos::assistant::AssistantInteractionType;
using chromeos::assistant::AssistantSuggestion;
@@ -131,8 +131,7 @@
Response() = default;
virtual ~Response() = default;
- virtual void SendTo(
- chromeos::assistant::AssistantInteractionSubscriber* receiver) = 0;
+ virtual void SendTo(AssistantInteractionSubscriber* receiver) = 0;
};
class TextResponse : public InteractionResponse::Response {
@@ -144,8 +143,7 @@
~TextResponse() override = default;
- void SendTo(
- chromeos::assistant::AssistantInteractionSubscriber* receiver) override {
+ void SendTo(AssistantInteractionSubscriber* receiver) override {
receiver->OnTextResponse(text_);
}
@@ -160,8 +158,7 @@
SuggestionsResponse& operator=(const SuggestionsResponse&) = delete;
~SuggestionsResponse() override = default;
- void SendTo(
- chromeos::assistant::AssistantInteractionSubscriber* receiver) override {
+ void SendTo(AssistantInteractionSubscriber* receiver) override {
std::vector<AssistantSuggestion> suggestions;
suggestions.emplace_back();
auto& suggestion = suggestions.back();
@@ -186,8 +183,7 @@
~ResolutionResponse() override = default;
- void SendTo(
- chromeos::assistant::AssistantInteractionSubscriber* receiver) override {
+ void SendTo(AssistantInteractionSubscriber* receiver) override {
receiver->OnInteractionFinished(resolution_);
}
@@ -350,8 +346,7 @@
responses_.push_back(std::move(response));
}
-void InteractionResponse::SendTo(
- chromeos::assistant::AssistantInteractionSubscriber* receiver) {
+void InteractionResponse::SendTo(AssistantInteractionSubscriber* receiver) {
for (auto& response : responses_)
response->SendTo(receiver);
}
diff --git a/ash/assistant/test/test_assistant_service.h b/ash/assistant/test/test_assistant_service.h
index 3e220c8..f40a05b 100644
--- a/ash/assistant/test/test_assistant_service.h
+++ b/ash/assistant/test/test_assistant_service.h
@@ -34,7 +34,7 @@
// assistant_service()->SetInteractionResponse(std::move(response));
class InteractionResponse {
public:
- using Resolution = chromeos::assistant::AssistantInteractionResolution;
+ using Resolution = assistant::AssistantInteractionResolution;
class Response;
InteractionResponse();
@@ -52,7 +52,7 @@
// |resolution| to |AssistantInteractionSubscriber::OnInteractionFinished|.
InteractionResponse* AddResolution(Resolution resolution);
- void SendTo(chromeos::assistant::AssistantInteractionSubscriber* receiver);
+ void SendTo(assistant::AssistantInteractionSubscriber* receiver);
private:
void AddResponse(std::unique_ptr<Response> responses);
@@ -71,7 +71,7 @@
// - Finish a conversation before starting a new one.
// - Not send any responses (text, card, ...) before starting or after
// finishing an interaction.
-class TestAssistantService : public chromeos::assistant::Assistant {
+class TestAssistantService : public assistant::Assistant {
public:
TestAssistantService();
@@ -97,11 +97,11 @@
void StartVoiceInteraction() override;
void StopActiveInteraction(bool cancel_conversation) override;
void AddAssistantInteractionSubscriber(
- chromeos::assistant::AssistantInteractionSubscriber* subscriber) override;
+ assistant::AssistantInteractionSubscriber* subscriber) override;
void RemoveAssistantInteractionSubscriber(
- chromeos::assistant::AssistantInteractionSubscriber* subscriber) override;
+ assistant::AssistantInteractionSubscriber* subscriber) override;
void AddRemoteConversationObserver(
- chromeos::assistant::ConversationObserver* observer) override {}
+ assistant::ConversationObserver* observer) override {}
mojo::PendingReceiver<chromeos::libassistant::mojom::NotificationDelegate>
GetPendingNotificationDelegate() override;
void RetrieveNotification(
@@ -137,7 +137,7 @@
absl::optional<bool> dark_mode_enabled_;
- base::ObserverList<chromeos::assistant::AssistantInteractionSubscriber>
+ base::ObserverList<assistant::AssistantInteractionSubscriber>
interaction_subscribers_;
bool running_active_interaction_ = false;
diff --git a/ash/assistant/ui/main_stage/assistant_footer_view.cc b/ash/assistant/ui/main_stage/assistant_footer_view.cc
index 51936a8..16377b8 100644
--- a/ash/assistant/ui/main_stage/assistant_footer_view.cc
+++ b/ash/assistant/ui/main_stage/assistant_footer_view.cc
@@ -74,8 +74,8 @@
// Initial view state is based on user consent state.
const bool consent_given =
AssistantState::Get()->consent_status().value_or(
- chromeos::assistant::prefs::ConsentStatus::kUnknown) ==
- chromeos::assistant::prefs::ConsentStatus::kActivityControlAccepted;
+ assistant::prefs::ConsentStatus::kUnknown) ==
+ assistant::prefs::ConsentStatus::kActivityControlAccepted;
// Suggestion container.
suggestion_container_ =
@@ -106,7 +106,7 @@
const bool consent_given =
consent_status ==
- chromeos::assistant::prefs::ConsentStatus::kActivityControlAccepted;
+ assistant::prefs::ConsentStatus::kActivityControlAccepted;
// When the consent state changes, we need to hide/show the appropriate views.
views::View* hide_view =
@@ -159,8 +159,8 @@
const ui::CallbackLayerAnimationObserver& observer) {
const bool consent_given =
AssistantState::Get()->consent_status().value_or(
- chromeos::assistant::prefs::ConsentStatus::kUnknown) ==
- chromeos::assistant::prefs::ConsentStatus::kActivityControlAccepted;
+ assistant::prefs::ConsentStatus::kUnknown) ==
+ assistant::prefs::ConsentStatus::kActivityControlAccepted;
// Only the view relevant to our consent state should process events.
suggestion_container_->SetCanProcessEventsWithinSubtree(consent_given);
diff --git a/ash/assistant/ui/main_stage/assistant_onboarding_view_unittest.cc b/ash/assistant/ui/main_stage/assistant_onboarding_view_unittest.cc
index d7ec3b1..9a51f12 100644
--- a/ash/assistant/ui/main_stage/assistant_onboarding_view_unittest.cc
+++ b/ash/assistant/ui/main_stage/assistant_onboarding_view_unittest.cc
@@ -83,8 +83,7 @@
// Mocks -----------------------------------------------------------------------
class MockAssistantInteractionSubscriber
- : public testing::NiceMock<
- chromeos::assistant::AssistantInteractionSubscriber> {
+ : public testing::NiceMock<assistant::AssistantInteractionSubscriber> {
public:
explicit MockAssistantInteractionSubscriber(Assistant* service) {
scoped_subscriber_.Observe(service);
@@ -98,8 +97,7 @@
(override));
private:
- chromeos::assistant::ScopedAssistantInteractionSubscriber scoped_subscriber_{
- this};
+ assistant::ScopedAssistantInteractionSubscriber scoped_subscriber_{this};
};
// ScopedShowUi ----------------------------------------------------------------
@@ -110,7 +108,7 @@
: original_visibility_(
AssistantUiController::Get()->GetModel()->visibility()) {
AssistantUiController::Get()->ShowUi(
- chromeos::assistant::AssistantEntryPoint::kUnspecified);
+ assistant::AssistantEntryPoint::kUnspecified);
}
ScopedShowUi(const ScopedShowUi&) = delete;
@@ -120,7 +118,7 @@
switch (original_visibility_) {
case AssistantVisibility::kClosed:
AssistantUiController::Get()->CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
return;
case AssistantVisibility::kVisible:
// No action necessary.
diff --git a/ash/assistant/ui/main_stage/assistant_opt_in_view.cc b/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
index 35f97dd..af36b80 100644
--- a/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
+++ b/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
@@ -40,8 +40,7 @@
}
std::u16string GetAction(int consent_status) {
- return consent_status ==
- chromeos::assistant::prefs::ConsentStatus::kUnauthorized
+ return consent_status == assistant::prefs::ConsentStatus::kUnauthorized
? l10n_util::GetStringUTF16(
IDS_ASH_ASSISTANT_OPT_IN_ASK_ADMINISTRATOR)
: l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_OPT_IN_GET_STARTED);
@@ -146,7 +145,7 @@
label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_CENTER);
UpdateLabel(AssistantState::Get()->consent_status().value_or(
- chromeos::assistant::prefs::ConsentStatus::kUnknown));
+ assistant::prefs::ConsentStatus::kUnknown));
}
void AssistantOptInView::UpdateLabel(int consent_status) {
diff --git a/ash/assistant/util/assistant_util.cc b/ash/assistant/util/assistant_util.cc
index a4ee8301..3f7c5ec6 100644
--- a/ash/assistant/util/assistant_util.cc
+++ b/ash/assistant/util/assistant_util.cc
@@ -20,8 +20,6 @@
namespace assistant {
namespace util {
-using chromeos::assistant::AssistantEntryPoint;
-
bool IsStartingSession(AssistantVisibility new_visibility,
AssistantVisibility old_visibility) {
return old_visibility == AssistantVisibility::kClosed &&
diff --git a/ash/assistant/util/assistant_util.h b/ash/assistant/util/assistant_util.h
index e29b09f..96ac324 100644
--- a/ash/assistant/util/assistant_util.h
+++ b/ash/assistant/util/assistant_util.h
@@ -7,13 +7,11 @@
#include "base/component_export.h"
-namespace chromeos {
+namespace ash {
+
namespace assistant {
enum class AssistantEntryPoint;
-} // namespace assistant
-} // namespace chromeos
-
-namespace ash {
+}
enum class AssistantVisibility;
@@ -34,8 +32,7 @@
// |prefer_voice| is true if user prefers voice input modality or if the device
// is in tablet mode.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-bool IsVoiceEntryPoint(chromeos::assistant::AssistantEntryPoint entry_point,
- bool prefer_voice);
+bool IsVoiceEntryPoint(AssistantEntryPoint entry_point, bool prefer_voice);
COMPONENT_EXPORT(ASSISTANT_UTIL)
bool IsGoogleDevice();
diff --git a/ash/assistant/util/deep_link_util.cc b/ash/assistant/util/deep_link_util.cc
index aa6ce57..f7339f8 100644
--- a/ash/assistant/util/deep_link_util.cc
+++ b/ash/assistant/util/deep_link_util.cc
@@ -22,7 +22,6 @@
namespace {
-using chromeos::assistant::AssistantEntryPoint;
using chromeos::assistant::AssistantQuerySource;
// Supported deep link param keys. These values must be kept in sync with the
diff --git a/ash/assistant/util/deep_link_util.h b/ash/assistant/util/deep_link_util.h
index 6aeb7d2..c5dbe1c 100644
--- a/ash/assistant/util/deep_link_util.h
+++ b/ash/assistant/util/deep_link_util.h
@@ -14,15 +14,15 @@
class GURL;
-namespace chromeos {
-namespace assistant {
-enum class AssistantEntryPoint;
+namespace chromeos::assistant {
enum class AssistantQuerySource;
-} // namespace assistant
-} // namespace chromeos
+}
namespace ash {
namespace assistant {
+
+enum class AssistantEntryPoint;
+
namespace util {
// Enumeration of deep link types.
@@ -79,9 +79,8 @@
// Returns a new deep link, having appended or replaced the entry point param
// from the original |deep_link| with |entry_point|.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-GURL AppendOrReplaceEntryPointParam(
- const GURL& deep_link,
- chromeos::assistant::AssistantEntryPoint entry_point);
+GURL AppendOrReplaceEntryPointParam(const GURL& deep_link,
+ AssistantEntryPoint entry_point);
// Returns a new deep link, having appended or replaced the query source param
// from the original |deep_link| with |query_source|.
@@ -135,9 +134,9 @@
// desired parameter is not found or is not mappable to an Assistant entry
// point, an empty value is returned.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-absl::optional<chromeos::assistant::AssistantEntryPoint>
-GetDeepLinkParamAsEntryPoint(const std::map<std::string, std::string>& params,
- DeepLinkParam param);
+absl::optional<AssistantEntryPoint> GetDeepLinkParamAsEntryPoint(
+ const std::map<std::string, std::string>& params,
+ DeepLinkParam param);
// Returns a specific GURL |param| from the given parameters. If the desired
// parameter is not found, an absent value is returned.
diff --git a/ash/assistant/util/deep_link_util_unittest.cc b/ash/assistant/util/deep_link_util_unittest.cc
index 8e9c568..581ebf1 100644
--- a/ash/assistant/util/deep_link_util_unittest.cc
+++ b/ash/assistant/util/deep_link_util_unittest.cc
@@ -20,7 +20,6 @@
namespace assistant {
namespace util {
-using chromeos::assistant::AssistantEntryPoint;
using chromeos::assistant::AssistantQuerySource;
using DeepLinkUtilTest = AshTestBase;
diff --git a/ash/assistant/util/histogram_util.cc b/ash/assistant/util/histogram_util.cc
index a5ec4c69..011606a2 100644
--- a/ash/assistant/util/histogram_util.cc
+++ b/ash/assistant/util/histogram_util.cc
@@ -13,17 +13,15 @@
namespace util {
void IncrementAssistantQueryCountForEntryPoint(
- chromeos::assistant::AssistantEntryPoint entry_point) {
+ AssistantEntryPoint entry_point) {
UMA_HISTOGRAM_ENUMERATION("Assistant.QueryCountPerEntryPoint", entry_point);
}
-void RecordAssistantEntryPoint(
- chromeos::assistant::AssistantEntryPoint entry_point) {
+void RecordAssistantEntryPoint(AssistantEntryPoint entry_point) {
UMA_HISTOGRAM_ENUMERATION("Assistant.EntryPoint", entry_point);
}
-void RecordAssistantExitPoint(
- chromeos::assistant::AssistantExitPoint exit_point) {
+void RecordAssistantExitPoint(AssistantExitPoint exit_point) {
UMA_HISTOGRAM_ENUMERATION("Assistant.ExitPoint", exit_point);
}
diff --git a/ash/assistant/util/histogram_util.h b/ash/assistant/util/histogram_util.h
index d7e9a634..44334135 100644
--- a/ash/assistant/util/histogram_util.h
+++ b/ash/assistant/util/histogram_util.h
@@ -17,18 +17,15 @@
// Increment number of queries fired for each entry point.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-void IncrementAssistantQueryCountForEntryPoint(
- chromeos::assistant::AssistantEntryPoint entry_point);
+void IncrementAssistantQueryCountForEntryPoint(AssistantEntryPoint entry_point);
// Record the entry point where Assistant UI becomes visible.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-void RecordAssistantEntryPoint(
- chromeos::assistant::AssistantEntryPoint entry_point);
+void RecordAssistantEntryPoint(AssistantEntryPoint entry_point);
// Record the exit point where Assistant UI becomes invisible.
COMPONENT_EXPORT(ASSISTANT_UTIL)
-void RecordAssistantExitPoint(
- chromeos::assistant::AssistantExitPoint exit_point);
+void RecordAssistantExitPoint(AssistantExitPoint exit_point);
// Count the number of times buttons are clicked on Assistant UI.
COMPONENT_EXPORT(ASSISTANT_UTIL)
diff --git a/ash/clipboard/clipboard_nudge.cc b/ash/clipboard/clipboard_nudge.cc
index 037acff..1908b7ac 100644
--- a/ash/clipboard/clipboard_nudge.cc
+++ b/ash/clipboard/clipboard_nudge.cc
@@ -51,8 +51,7 @@
bool IsAssistantAvailable() {
AssistantStateBase* state = AssistantState::Get();
- return state->allowed_state() ==
- chromeos::assistant::AssistantAllowedState::ALLOWED &&
+ return state->allowed_state() == assistant::AssistantAllowedState::ALLOWED &&
state->settings_enabled().value_or(false);
}
diff --git a/ash/public/cpp/assistant/assistant_state.cc b/ash/public/cpp/assistant/assistant_state.cc
index 468e50e..3d328f8 100644
--- a/ash/public/cpp/assistant/assistant_state.cc
+++ b/ash/public/cpp/assistant/assistant_state.cc
@@ -35,8 +35,7 @@
g_assistant_state = nullptr;
}
-void AssistantState::NotifyStatusChanged(
- chromeos::assistant::AssistantStatus status) {
+void AssistantState::NotifyStatusChanged(assistant::AssistantStatus status) {
if (assistant_status_ == status)
return;
@@ -44,7 +43,7 @@
}
void AssistantState::NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState state) {
+ assistant::AssistantAllowedState state) {
if (allowed_state_ == state)
return;
diff --git a/ash/public/cpp/assistant/assistant_state.h b/ash/public/cpp/assistant/assistant_state.h
index e6cd429..3d8ede5 100644
--- a/ash/public/cpp/assistant/assistant_state.h
+++ b/ash/public/cpp/assistant/assistant_state.h
@@ -28,8 +28,8 @@
~AssistantState() override;
- void NotifyStatusChanged(chromeos::assistant::AssistantStatus status);
- void NotifyFeatureAllowed(chromeos::assistant::AssistantAllowedState state);
+ void NotifyStatusChanged(assistant::AssistantStatus status);
+ void NotifyFeatureAllowed(assistant::AssistantAllowedState state);
void NotifyLocaleChanged(const std::string& locale);
void NotifyArcPlayStoreEnabledChanged(bool enabled);
void NotifyLockedFullScreenStateChanged(bool enabled);
diff --git a/ash/public/cpp/assistant/assistant_state_base.cc b/ash/public/cpp/assistant/assistant_state_base.cc
index b9ac426d..f9c0c37 100644
--- a/ash/public/cpp/assistant/assistant_state_base.cc
+++ b/ash/public/cpp/assistant/assistant_state_base.cc
@@ -19,7 +19,7 @@
namespace {
-using chromeos::assistant::prefs::AssistantOnboardingMode;
+using assistant::prefs::AssistantOnboardingMode;
#define PRINT_VALUE(value) PrintValue(&result, #value, value())
@@ -87,35 +87,35 @@
pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>();
pref_change_registrar_->Init(pref_service);
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantConsentStatus,
+ assistant::prefs::kAssistantConsentStatus,
base::BindRepeating(&AssistantStateBase::UpdateConsentStatus,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantContextEnabled,
+ assistant::prefs::kAssistantContextEnabled,
base::BindRepeating(&AssistantStateBase::UpdateContextEnabled,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantEnabled,
+ assistant::prefs::kAssistantEnabled,
base::BindRepeating(&AssistantStateBase::UpdateSettingsEnabled,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantHotwordAlwaysOn,
+ assistant::prefs::kAssistantHotwordAlwaysOn,
base::BindRepeating(&AssistantStateBase::UpdateHotwordAlwaysOn,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantHotwordEnabled,
+ assistant::prefs::kAssistantHotwordEnabled,
base::BindRepeating(&AssistantStateBase::UpdateHotwordEnabled,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantLaunchWithMicOpen,
+ assistant::prefs::kAssistantLaunchWithMicOpen,
base::BindRepeating(&AssistantStateBase::UpdateLaunchWithMicOpen,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantNotificationEnabled,
+ assistant::prefs::kAssistantNotificationEnabled,
base::BindRepeating(&AssistantStateBase::UpdateNotificationEnabled,
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantOnboardingMode,
+ assistant::prefs::kAssistantOnboardingMode,
base::BindRepeating(&AssistantStateBase::UpdateOnboardingMode,
base::Unretained(this)));
@@ -130,8 +130,7 @@
}
bool AssistantStateBase::IsScreenContextAllowed() const {
- return allowed_state() ==
- chromeos::assistant::AssistantAllowedState::ALLOWED &&
+ return allowed_state() == assistant::AssistantAllowedState::ALLOWED &&
settings_enabled().value_or(false) &&
context_enabled().value_or(false);
}
@@ -175,7 +174,7 @@
void AssistantStateBase::UpdateConsentStatus() {
auto consent_status = pref_change_registrar_->prefs()->GetInteger(
- chromeos::assistant::prefs::kAssistantConsentStatus);
+ assistant::prefs::kAssistantConsentStatus);
if (consent_status_.has_value() &&
consent_status_.value() == consent_status) {
return;
@@ -187,7 +186,7 @@
void AssistantStateBase::UpdateContextEnabled() {
auto context_enabled = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantContextEnabled);
+ assistant::prefs::kAssistantContextEnabled);
if (context_enabled_.has_value() &&
context_enabled_.value() == context_enabled) {
return;
@@ -199,7 +198,7 @@
void AssistantStateBase::UpdateSettingsEnabled() {
auto settings_enabled = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantEnabled);
+ assistant::prefs::kAssistantEnabled);
if (settings_enabled_.has_value() &&
settings_enabled_.value() == settings_enabled) {
return;
@@ -211,7 +210,7 @@
void AssistantStateBase::UpdateHotwordAlwaysOn() {
auto hotword_always_on = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantHotwordAlwaysOn);
+ assistant::prefs::kAssistantHotwordAlwaysOn);
if (hotword_always_on_.has_value() &&
hotword_always_on_.value() == hotword_always_on) {
return;
@@ -223,7 +222,7 @@
void AssistantStateBase::UpdateHotwordEnabled() {
auto hotword_enabled = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantHotwordEnabled);
+ assistant::prefs::kAssistantHotwordEnabled);
if (hotword_enabled_.has_value() &&
hotword_enabled_.value() == hotword_enabled) {
return;
@@ -235,7 +234,7 @@
void AssistantStateBase::UpdateLaunchWithMicOpen() {
auto launch_with_mic_open = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantLaunchWithMicOpen);
+ assistant::prefs::kAssistantLaunchWithMicOpen);
if (launch_with_mic_open_.has_value() &&
launch_with_mic_open_.value() == launch_with_mic_open) {
return;
@@ -247,7 +246,7 @@
void AssistantStateBase::UpdateNotificationEnabled() {
auto notification_enabled = pref_change_registrar_->prefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantNotificationEnabled);
+ assistant::prefs::kAssistantNotificationEnabled);
if (notification_enabled_.has_value() &&
notification_enabled_.value() == notification_enabled) {
return;
@@ -258,10 +257,9 @@
}
void AssistantStateBase::UpdateOnboardingMode() {
- AssistantOnboardingMode onboarding_mode =
- chromeos::assistant::prefs::ToOnboardingMode(
- pref_change_registrar_->prefs()->GetString(
- chromeos::assistant::prefs::kAssistantOnboardingMode));
+ AssistantOnboardingMode onboarding_mode = assistant::prefs::ToOnboardingMode(
+ pref_change_registrar_->prefs()->GetString(
+ assistant::prefs::kAssistantOnboardingMode));
if (onboarding_mode_ == onboarding_mode)
return;
@@ -272,14 +270,14 @@
}
void AssistantStateBase::UpdateAssistantStatus(
- chromeos::assistant::AssistantStatus status) {
+ assistant::AssistantStatus status) {
assistant_status_ = status;
for (auto& observer : observers_)
observer.OnAssistantStatusChanged(assistant_status_);
}
void AssistantStateBase::UpdateFeatureAllowedState(
- chromeos::assistant::AssistantAllowedState state) {
+ assistant::AssistantAllowedState state) {
allowed_state_ = state;
for (auto& observer : observers_)
observer.OnAssistantFeatureAllowedChanged(allowed_state_.value());
diff --git a/ash/public/cpp/assistant/assistant_state_base.h b/ash/public/cpp/assistant/assistant_state_base.h
index fa60383..8e26638 100644
--- a/ash/public/cpp/assistant/assistant_state_base.h
+++ b/ash/public/cpp/assistant/assistant_state_base.h
@@ -38,12 +38,11 @@
virtual void OnAssistantLaunchWithMicOpen(bool launch_with_mic_open) {}
virtual void OnAssistantNotificationEnabled(bool notification_enabled) {}
virtual void OnAssistantOnboardingModeChanged(
- chromeos::assistant::prefs::AssistantOnboardingMode onboarding_mode) {}
+ assistant::prefs::AssistantOnboardingMode onboarding_mode) {}
virtual void OnAssistantStateDestroyed() {}
- virtual void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {}
+ virtual void OnAssistantStatusChanged(assistant::AssistantStatus status) {}
virtual void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) {}
+ assistant::AssistantAllowedState state) {}
virtual void OnArcPlayStoreEnabledChanged(bool enabled) {}
virtual void OnLocaleChanged(const std::string& locale) {}
virtual void OnLockedFullScreenStateChanged(bool enabled) {}
@@ -63,7 +62,7 @@
virtual ~AssistantStateBase();
- chromeos::assistant::AssistantStatus assistant_status() const {
+ assistant::AssistantStatus assistant_status() const {
return assistant_status_;
}
@@ -93,13 +92,13 @@
return notification_enabled_;
}
- const absl::optional<chromeos::assistant::prefs::AssistantOnboardingMode>&
+ const absl::optional<assistant::prefs::AssistantOnboardingMode>&
onboarding_mode() const {
return onboarding_mode_;
}
- const absl::optional<chromeos::assistant::AssistantAllowedState>&
- allowed_state() const {
+ const absl::optional<assistant::AssistantAllowedState>& allowed_state()
+ const {
return allowed_state_;
}
@@ -138,15 +137,14 @@
void UpdateOnboardingMode();
// Called when new values of the listened states are received.
- void UpdateAssistantStatus(chromeos::assistant::AssistantStatus status);
- void UpdateFeatureAllowedState(
- chromeos::assistant::AssistantAllowedState state);
+ void UpdateAssistantStatus(assistant::AssistantStatus status);
+ void UpdateFeatureAllowedState(assistant::AssistantAllowedState state);
void UpdateLocale(const std::string& locale);
void UpdateArcPlayStoreEnabled(bool enabled);
void UpdateLockedFullScreenState(bool enabled);
- chromeos::assistant::AssistantStatus assistant_status_ =
- chromeos::assistant::AssistantStatus::NOT_READY;
+ assistant::AssistantStatus assistant_status_ =
+ assistant::AssistantStatus::NOT_READY;
// TODO(b/138679823): Maybe remove Optional for preference values.
// Whether the Assistant is enabled in system settings. nullopt if the
@@ -174,12 +172,11 @@
absl::optional<bool> notification_enabled_;
// The mode for the Assistant onboarding experience.
- absl::optional<chromeos::assistant::prefs::AssistantOnboardingMode>
- onboarding_mode_;
+ absl::optional<assistant::prefs::AssistantOnboardingMode> onboarding_mode_;
// Whether the Assistant feature is allowed or disallowed for what reason.
// nullopt if the data is not available yet.
- absl::optional<chromeos::assistant::AssistantAllowedState> allowed_state_;
+ absl::optional<assistant::AssistantAllowedState> allowed_state_;
absl::optional<std::string> locale_;
diff --git a/ash/public/cpp/assistant/controller/assistant_controller.h b/ash/public/cpp/assistant/controller/assistant_controller.h
index 9c611a76..a396bcb 100644
--- a/ash/public/cpp/assistant/controller/assistant_controller.h
+++ b/ash/public/cpp/assistant/controller/assistant_controller.h
@@ -40,7 +40,7 @@
virtual base::WeakPtr<AssistantController> GetWeakPtr() = 0;
// Provides a reference to the underlying |assistant| service.
- virtual void SetAssistant(chromeos::assistant::Assistant* assistant) = 0;
+ virtual void SetAssistant(assistant::Assistant* assistant) = 0;
// Methods below may only be called after |SetAssistant| is called.
// Show speaker id enrollment flow.
diff --git a/ash/public/cpp/assistant/controller/assistant_ui_controller.h b/ash/public/cpp/assistant/controller/assistant_ui_controller.h
index 1100a5a..c62a622 100644
--- a/ash/public/cpp/assistant/controller/assistant_ui_controller.h
+++ b/ash/public/cpp/assistant/controller/assistant_ui_controller.h
@@ -9,14 +9,12 @@
#include "base/callback_helpers.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
-namespace chromeos {
+namespace ash {
+
namespace assistant {
enum class AssistantEntryPoint;
enum class AssistantExitPoint;
} // namespace assistant
-} // namespace chromeos
-
-namespace ash {
class AssistantUiModel;
@@ -40,16 +38,15 @@
virtual void SetKeyboardTraversalMode(bool) = 0;
// Invoke to show/toggle Assistant UI.
- virtual void ShowUi(chromeos::assistant::AssistantEntryPoint) = 0;
- virtual void ToggleUi(
- absl::optional<chromeos::assistant::AssistantEntryPoint>,
- absl::optional<chromeos::assistant::AssistantExitPoint>) = 0;
+ virtual void ShowUi(assistant::AssistantEntryPoint) = 0;
+ virtual void ToggleUi(absl::optional<assistant::AssistantEntryPoint>,
+ absl::optional<assistant::AssistantExitPoint>) = 0;
// Returns a closure to close Assistant UI. If the return value is ignored,
// the Assistant UI is closed instantly; otherwise, the UI is in closing
// state until the closure is run.
virtual absl::optional<base::ScopedClosureRunner> CloseUi(
- chromeos::assistant::AssistantExitPoint) = 0;
+ assistant::AssistantExitPoint) = 0;
// Sets current AppListBubbleWidth. AssistantCardElement needs to know the
// width of AppListBubbleWidth to render its html content.
diff --git a/ash/public/cpp/assistant/test_support/mock_assistant_state.cc b/ash/public/cpp/assistant/test_support/mock_assistant_state.cc
index 682dabb..42044e9 100644
--- a/ash/public/cpp/assistant/test_support/mock_assistant_state.cc
+++ b/ash/public/cpp/assistant/test_support/mock_assistant_state.cc
@@ -7,14 +7,14 @@
namespace ash {
MockAssistantState::MockAssistantState() {
- allowed_state_ = chromeos::assistant::AssistantAllowedState::ALLOWED;
+ allowed_state_ = assistant::AssistantAllowedState::ALLOWED;
settings_enabled_ = true;
}
MockAssistantState::~MockAssistantState() = default;
void MockAssistantState::SetAllowedState(
- chromeos::assistant::AssistantAllowedState allowed_state) {
+ assistant::AssistantAllowedState allowed_state) {
if (allowed_state_ != allowed_state) {
allowed_state_ = allowed_state;
for (auto& observer : observers_)
diff --git a/ash/public/cpp/assistant/test_support/mock_assistant_state.h b/ash/public/cpp/assistant/test_support/mock_assistant_state.h
index 1bd1477..22585770 100644
--- a/ash/public/cpp/assistant/test_support/mock_assistant_state.h
+++ b/ash/public/cpp/assistant/test_support/mock_assistant_state.h
@@ -16,8 +16,7 @@
MockAssistantState& operator=(const MockAssistantState&) = delete;
~MockAssistantState() override;
- void SetAllowedState(
- chromeos::assistant::AssistantAllowedState allowed_state);
+ void SetAllowedState(assistant::AssistantAllowedState allowed_state);
void SetSettingsEnabled(bool enabled);
};
diff --git a/ash/public/cpp/test/assistant_test_api.h b/ash/public/cpp/test/assistant_test_api.h
index 9c2cccd..2feaedf 100644
--- a/ash/public/cpp/test/assistant_test_api.h
+++ b/ash/public/cpp/test/assistant_test_api.h
@@ -63,7 +63,7 @@
virtual void SetTabletMode(bool enable) = 0;
// Changes the user preference controlling the status of user consent.
- virtual void SetConsentStatus(chromeos::assistant::prefs::ConsentStatus) = 0;
+ virtual void SetConsentStatus(assistant::prefs::ConsentStatus) = 0;
// Sets the number of user sessions where Assistant onboarding was shown.
virtual void SetNumberOfSessionsWhereOnboardingShown(
@@ -71,7 +71,7 @@
// Changes the user preference controlling the mode of the onboarding UX.
virtual void SetOnboardingMode(
- chromeos::assistant::prefs::AssistantOnboardingMode onboarding_mode) = 0;
+ assistant::prefs::AssistantOnboardingMode onboarding_mode) = 0;
// Changes the user setting controlling whether the user prefers voice or
// keyboard (internally called |kAssistantLaunchWithMicOpen|).
diff --git a/ash/shelf/assistant_overlay_unittest.cc b/ash/shelf/assistant_overlay_unittest.cc
index cf05234..987ce11d 100644
--- a/ash/shelf/assistant_overlay_unittest.cc
+++ b/ash/shelf/assistant_overlay_unittest.cc
@@ -65,12 +65,11 @@
// Enable Assistant
Shell::Get()->session_controller()->GetPrimaryUserPrefService()->SetBoolean(
- chromeos::assistant::prefs::kAssistantEnabled, true);
+ assistant::prefs::kAssistantEnabled, true);
AssistantState* assistant_state = AssistantState::Get();
assistant_state->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
- assistant_state->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantAllowedState::ALLOWED);
+ assistant_state->NotifyStatusChanged(assistant::AssistantStatus::READY);
const TestVariant test_variant = GetParam();
switch (test_variant) {
diff --git a/ash/shelf/home_button_controller.cc b/ash/shelf/home_button_controller.cc
index 17294c2..b9271a6 100644
--- a/ash/shelf/home_button_controller.cc
+++ b/ash/shelf/home_button_controller.cc
@@ -130,8 +130,7 @@
bool HomeButtonController::IsAssistantAvailable() {
AssistantStateBase* state = AssistantState::Get();
- return state->allowed_state() ==
- chromeos::assistant::AssistantAllowedState::ALLOWED &&
+ return state->allowed_state() == assistant::AssistantAllowedState::ALLOWED &&
state->settings_enabled().value_or(false);
}
@@ -156,7 +155,7 @@
}
void HomeButtonController::OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) {
+ assistant::AssistantAllowedState state) {
button_->OnAssistantAvailabilityChanged();
}
diff --git a/ash/shelf/home_button_controller.h b/ash/shelf/home_button_controller.h
index 6db20207..025f354 100644
--- a/ash/shelf/home_button_controller.h
+++ b/ash/shelf/home_button_controller.h
@@ -56,7 +56,7 @@
// AssistantStateObserver:
void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState) override;
+ assistant::AssistantAllowedState) override;
void OnAssistantSettingsEnabled(bool enabled) override;
// AssistantUiModelObserver:
diff --git a/ash/shelf/home_button_unittest.cc b/ash/shelf/home_button_unittest.cc
index f8d615db..7c45e0f 100644
--- a/ash/shelf/home_button_unittest.cc
+++ b/ash/shelf/home_button_unittest.cc
@@ -596,11 +596,10 @@
CreateUserSessions(2);
// Enable the Assistant in system settings.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
assistant_state()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantAllowedState::ALLOWED);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShelfNavigationWidget::TestApi test_api(
GetPrimaryShelf()->navigation_widget());
@@ -615,7 +614,7 @@
AssistantUiController::Get()->GetModel()->visibility());
AssistantUiController::Get()->CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
// Test long press gesture on secondary display.
SendGestureEventToSecondaryDisplay(&long_press);
GetAppListTestHelper()->WaitUntilIdle();
@@ -628,11 +627,10 @@
CreateUserSessions(2);
// Enable the Assistant in system settings.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
assistant_state()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantAllowedState::ALLOWED);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::READY);
Shell::Get()->tablet_mode_controller()->SetEnabledForTest(true);
@@ -671,17 +669,16 @@
AssistantUiController::Get()->GetModel()->visibility());
AssistantUiController::Get()->CloseUi(
- chromeos::assistant::AssistantExitPoint::kUnspecified);
+ assistant::AssistantExitPoint::kUnspecified);
}
TEST_P(HomeButtonTest, LongPressGestureWithSecondaryUser) {
// Disallowed by secondary user.
assistant_state()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::
- DISALLOWED_BY_NONPRIMARY_USER);
+ assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER);
// Enable the Assistant in system settings.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
ShelfNavigationWidget::TestApi test_api(
GetPrimaryShelf()->navigation_widget());
@@ -707,9 +704,9 @@
// Simulate a user who has already completed setup flow, but disabled the
// Assistant in settings.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, false);
assistant_state()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ assistant::AssistantAllowedState::ALLOWED);
ShelfNavigationWidget::TestApi test_api(
GetPrimaryShelf()->navigation_widget());
diff --git a/ash/shelf/hotseat_widget_unittest.cc b/ash/shelf/hotseat_widget_unittest.cc
index d3b53de..8f0612a 100644
--- a/ash/shelf/hotseat_widget_unittest.cc
+++ b/ash/shelf/hotseat_widget_unittest.cc
@@ -105,9 +105,9 @@
if (is_assistant_enabled_) {
assistant_test_api_->SetAssistantEnabled(true);
assistant_test_api_->GetAssistantState()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ assistant::AssistantAllowedState::ALLOWED);
assistant_test_api_->GetAssistantState()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant::AssistantStatus::READY);
assistant_test_api_->WaitUntilIdle();
}
@@ -138,7 +138,7 @@
if (!navigation_buttons_shown_in_tablet_mode_ &&
Shell::Get()->tablet_mode_controller()->InTabletMode()) {
AssistantUiController::Get()->ShowUi(
- chromeos::assistant::AssistantEntryPoint::kLongPressLauncher);
+ assistant::AssistantEntryPoint::kLongPressLauncher);
return;
}
diff --git a/ash/system/palette/palette_tray_unittest.cc b/ash/system/palette/palette_tray_unittest.cc
index 593326c..07bea882 100644
--- a/ash/system/palette/palette_tray_unittest.cc
+++ b/ash/system/palette/palette_tray_unittest.cc
@@ -395,12 +395,10 @@
ui::ScopedAnimationDurationScaleMode animation_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
assistant_state()->NotifyFeatureAllowed(
- chromeos::assistant::AssistantAllowedState::ALLOWED);
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- true);
+ assistant::AssistantAllowedState::ALLOWED);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::READY);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, true);
ui::test::EventGenerator* generator = GetEventGenerator();
generator->EnterPenPointerMode();
@@ -462,8 +460,7 @@
// Disabling metalayer support in the delegate should disable the palette
// tool.
test_api_->palette_tool_manager()->ActivateTool(PaletteToolId::METALAYER);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, false);
EXPECT_FALSE(metalayer_enabled());
// With the metalayer disabled again, press/drag does not activate the
@@ -476,11 +473,9 @@
TEST_F(PaletteTrayTestWithAssistant, StylusBarrelButtonActivatesHighlighter) {
ui::ScopedAnimationDurationScaleMode animation_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::NOT_READY);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, false);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- false);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::NOT_READY);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, false);
ui::test::EventGenerator* generator = GetEventGenerator();
generator->EnterPenPointerMode();
@@ -500,21 +495,19 @@
false /* no highlighter on press */);
// Enable one of the two user prefs, should not be sufficient.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, true);
WaitDragAndAssertMetalayer("one pref enabled", origin,
ui::EF_LEFT_MOUSE_BUTTON, false /* no metalayer */,
false /* no highlighter on press */);
// Enable the other user pref, still not sufficient.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
WaitDragAndAssertMetalayer("two prefs enabled", origin,
ui::EF_LEFT_MOUSE_BUTTON, false /* no metalayer */,
false /* no highlighter on press */);
// Once the service is ready, the button should start working.
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::READY);
// Press and drag with no button, still no highlighter.
WaitDragAndAssertMetalayer("all enabled, no button ", origin, ui::EF_NONE,
@@ -578,8 +571,7 @@
// Disable the metalayer support.
// This should deactivate both the palette tool and the highlighter.
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, false);
EXPECT_FALSE(test_api_->palette_tool_manager()->IsToolActive(
PaletteToolId::METALAYER));
diff --git a/ash/system/palette/tools/metalayer_mode.cc b/ash/system/palette/tools/metalayer_mode.cc
index e0bddd7..48a4dad 100644
--- a/ash/system/palette/tools/metalayer_mode.cc
+++ b/ash/system/palette/tools/metalayer_mode.cc
@@ -163,11 +163,11 @@
// time.
toast_event = kDeprecatedToastNotShown;
if (!GetPrefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantDeprecateStylusToast)) {
+ assistant::prefs::kAssistantDeprecateStylusToast)) {
// Set the deprecate stylus toast assistant pref so that the toast doesn't
// repeatedly show.
- GetPrefs()->SetBoolean(
- chromeos::assistant::prefs::kAssistantDeprecateStylusToast, true);
+ GetPrefs()->SetBoolean(assistant::prefs::kAssistantDeprecateStylusToast,
+ true);
Shell::Get()->toast_manager()->Show(
ToastData(kDeprecateAssistantStylusToastId,
ToastCatalogName::kDeprecateAssistantStylus,
@@ -221,7 +221,7 @@
}
void MetalayerMode::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {
+ assistant::AssistantStatus status) {
assistant_status_ = status;
UpdateState();
}
@@ -237,7 +237,7 @@
}
void MetalayerMode::OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) {
+ assistant::AssistantAllowedState state) {
assistant_allowed_state_ = state;
UpdateState();
}
diff --git a/ash/system/palette/tools/metalayer_mode.h b/ash/system/palette/tools/metalayer_mode.h
index ae01a04..9e1d627 100644
--- a/ash/system/palette/tools/metalayer_mode.h
+++ b/ash/system/palette/tools/metalayer_mode.h
@@ -57,20 +57,20 @@
bool feature_enabled() const {
return assistant_enabled_ && assistant_context_enabled_ &&
assistant_allowed_state_ ==
- chromeos::assistant::AssistantAllowedState::ALLOWED;
+ assistant::AssistantAllowedState::ALLOWED;
}
// Whether the tool is in "loading" state.
bool loading() const {
return feature_enabled() &&
- assistant_status_ == chromeos::assistant::AssistantStatus::NOT_READY;
+ assistant_status_ == assistant::AssistantStatus::NOT_READY;
}
// Whether the tool can be selected from the menu (only true when enabled
// by the user and fully loaded).
bool selectable() const {
return feature_enabled() &&
- assistant_status_ != chromeos::assistant::AssistantStatus::NOT_READY;
+ assistant_status_ != assistant::AssistantStatus::NOT_READY;
}
// PaletteTool:
@@ -89,12 +89,11 @@
void OnGestureEvent(ui::GestureEvent* event) override;
// AssistantStateObserver:
- void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override;
+ void OnAssistantStatusChanged(assistant::AssistantStatus status) override;
void OnAssistantSettingsEnabled(bool enabled) override;
void OnAssistantContextEnabled(bool enabled) override;
void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState state) override;
+ assistant::AssistantAllowedState state) override;
// HighlighterController::Observer:
void OnHighlighterEnabledChanged(HighlighterEnabledState state) override;
@@ -108,15 +107,15 @@
// Called when the metalayer session is complete.
void OnMetalayerSessionComplete();
- chromeos::assistant::AssistantStatus assistant_status_ =
- chromeos::assistant::AssistantStatus::NOT_READY;
+ assistant::AssistantStatus assistant_status_ =
+ assistant::AssistantStatus::NOT_READY;
bool assistant_enabled_ = false;
bool assistant_context_enabled_ = false;
- chromeos::assistant::AssistantAllowedState assistant_allowed_state_ =
- chromeos::assistant::AssistantAllowedState::ALLOWED;
+ assistant::AssistantAllowedState assistant_allowed_state_ =
+ assistant::AssistantAllowedState::ALLOWED;
base::TimeTicks previous_stroke_end_;
diff --git a/ash/system/palette/tools/metalayer_unittest.cc b/ash/system/palette/tools/metalayer_unittest.cc
index 5cb37e1..8a7c0ed 100644
--- a/ash/system/palette/tools/metalayer_unittest.cc
+++ b/ash/system/palette/tools/metalayer_unittest.cc
@@ -70,37 +70,32 @@
// The metalayer tool is always visible, but only enabled when the user
// has enabled the metalayer AND the Assistant framework is ready.
TEST_F(MetalayerToolTest, PaletteMenuState) {
- const chromeos::assistant::AssistantStatus kStates[] = {
- chromeos::assistant::AssistantStatus::NOT_READY,
- chromeos::assistant::AssistantStatus::READY};
- const chromeos::assistant::AssistantAllowedState kAllowedStates[] = {
- chromeos::assistant::AssistantAllowedState::ALLOWED,
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_POLICY,
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_LOCALE,
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_INCOGNITO,
+ const assistant::AssistantStatus kStates[] = {
+ assistant::AssistantStatus::NOT_READY, assistant::AssistantStatus::READY};
+ const assistant::AssistantAllowedState kAllowedStates[] = {
+ assistant::AssistantAllowedState::ALLOWED,
+ assistant::AssistantAllowedState::DISALLOWED_BY_POLICY,
+ assistant::AssistantAllowedState::DISALLOWED_BY_LOCALE,
+ assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
+ assistant::AssistantAllowedState::DISALLOWED_BY_INCOGNITO,
};
const std::u16string kLoading(u"loading");
// Iterate over every possible combination of states.
- for (chromeos::assistant::AssistantStatus state : kStates) {
- for (chromeos::assistant::AssistantAllowedState allowed_state :
- kAllowedStates) {
+ for (assistant::AssistantStatus state : kStates) {
+ for (assistant::AssistantAllowedState allowed_state : kAllowedStates) {
for (int enabled = 0; enabled <= 1; enabled++) {
for (int context = 0; context <= 1; context++) {
const bool allowed =
- allowed_state ==
- chromeos::assistant::AssistantAllowedState::ALLOWED;
- const bool ready =
- state != chromeos::assistant::AssistantStatus::NOT_READY;
+ allowed_state == assistant::AssistantAllowedState::ALLOWED;
+ const bool ready = state != assistant::AssistantStatus::NOT_READY;
const bool selectable = allowed && enabled && context && ready;
assistant_state()->NotifyStatusChanged(state);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled,
- enabled);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, enabled);
assistant_state()->NotifyFeatureAllowed(allowed_state);
- prefs()->SetBoolean(
- chromeos::assistant::prefs::kAssistantContextEnabled, context);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled,
+ context);
std::unique_ptr<views::View> view =
base::WrapUnique(tool_->CreateView());
@@ -146,26 +141,23 @@
// Verifies that disabling the metalayer support disables the tool.
TEST_F(MetalayerToolTest, MetalayerUnsupportedDisablesPaletteTool) {
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, true);
// Disabling the user prefs individually should disable the tool.
tool_->OnEnable();
EXPECT_CALL(*palette_tool_delegate_.get(),
DisableTool(PaletteToolId::METALAYER));
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, false);
testing::Mock::VerifyAndClearExpectations(palette_tool_delegate_.get());
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantEnabled, true);
tool_->OnEnable();
EXPECT_CALL(*palette_tool_delegate_.get(),
DisableTool(PaletteToolId::METALAYER));
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- false);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, false);
testing::Mock::VerifyAndClearExpectations(palette_tool_delegate_.get());
- prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- true);
+ prefs()->SetBoolean(assistant::prefs::kAssistantContextEnabled, true);
// Test AssistantState changes.
tool_->OnEnable();
@@ -175,16 +167,14 @@
EXPECT_CALL(*palette_tool_delegate_.get(),
DisableTool(PaletteToolId::METALAYER))
.Times(0);
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::READY);
testing::Mock::VerifyAndClearExpectations(palette_tool_delegate_.get());
// Changing the state to NOT_READY should disable the tool.
EXPECT_CALL(*palette_tool_delegate_.get(),
DisableTool(PaletteToolId::METALAYER))
.Times(testing::AtLeast(1));
- assistant_state()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::NOT_READY);
+ assistant_state()->NotifyStatusChanged(assistant::AssistantStatus::NOT_READY);
testing::Mock::VerifyAndClearExpectations(palette_tool_delegate_.get());
}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index c56248f..71407db 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -6197,7 +6197,7 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"enable-assistant-dsp", flag_descriptions::kEnableGoogleAssistantDspName,
flag_descriptions::kEnableGoogleAssistantDspDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(chromeos::assistant::features::kEnableDspHotword)},
+ FEATURE_VALUE_TYPE(ash::assistant::features::kEnableDspHotword)},
{"deprecate-assistant-stylus-features",
flag_descriptions::kDeprecateAssistantStylusFeaturesName,
@@ -6274,8 +6274,7 @@
{"enable-assistant-stereo-input",
flag_descriptions::kEnableGoogleAssistantStereoInputName,
flag_descriptions::kEnableGoogleAssistantStereoInputDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(
- chromeos::assistant::features::kEnableStereoAudioInput)},
+ FEATURE_VALUE_TYPE(ash::assistant::features::kEnableStereoAudioInput)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
{"enable-gpu-service-logging",
@@ -6657,7 +6656,7 @@
{"enable-assistant-routines",
flag_descriptions::kEnableAssistantRoutinesName,
flag_descriptions::kEnableAssistantRoutinesDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(chromeos::assistant::features::kAssistantRoutines)},
+ FEATURE_VALUE_TYPE(ash::assistant::features::kAssistantRoutines)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -6833,7 +6832,7 @@
FEATURE_VALUE_TYPE(ash::features::kDeviceForceScheduledReboot)},
{"enable-assistant-aec", flag_descriptions::kEnableGoogleAssistantAecName,
flag_descriptions::kEnableGoogleAssistantAecDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(chromeos::assistant::features::kAssistantAudioEraser)},
+ FEATURE_VALUE_TYPE(ash::assistant::features::kAssistantAudioEraser)},
#endif
#if BUILDFLAG(IS_WIN)
diff --git a/chrome/browser/ash/assistant/assistant_util.cc b/chrome/browser/ash/assistant/assistant_util.cc
index 62de06f..3070ccb2 100644
--- a/chrome/browser/ash/assistant/assistant_util.cc
+++ b/chrome/browser/ash/assistant/assistant_util.cc
@@ -23,7 +23,7 @@
namespace {
-using chromeos::assistant::AssistantAllowedState;
+using ::ash::assistant::AssistantAllowedState;
bool g_override_is_google_device = false;
@@ -111,7 +111,7 @@
bool IsAssistantDisabledByPolicy(const Profile* profile) {
return profile->GetPrefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantDisabledByPolicy);
+ ash::assistant::prefs::kAssistantDisabledByPolicy);
}
bool IsEmailDomainSupported(const Profile* profile) {
diff --git a/chrome/browser/ash/assistant/assistant_util.h b/chrome/browser/ash/assistant/assistant_util.h
index b9fd99b..b63cd90a 100644
--- a/chrome/browser/ash/assistant/assistant_util.h
+++ b/chrome/browser/ash/assistant/assistant_util.h
@@ -12,7 +12,7 @@
namespace assistant {
// Returns whether Google Assistant feature is allowed for given |profile|.
-chromeos::assistant::AssistantAllowedState IsAssistantAllowedForProfile(
+ash::assistant::AssistantAllowedState IsAssistantAllowedForProfile(
const Profile* profile);
void OverrideIsGoogleDeviceForTesting(bool is_google_device);
diff --git a/chrome/browser/ash/assistant/assistant_util_unittest.cc b/chrome/browser/ash/assistant/assistant_util_unittest.cc
index 42ca7349..18cf0b8 100644
--- a/chrome/browser/ash/assistant/assistant_util_unittest.cc
+++ b/chrome/browser/ash/assistant/assistant_util_unittest.cc
@@ -270,7 +270,7 @@
ScopedLogIn login(GetFakeUserManager(), identity_test_env(),
GetGaiaUserAccountId(profile()));
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::ALLOWED,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::ALLOWED,
IsAssistantAllowedForProfile(profile()));
}
@@ -282,7 +282,7 @@
GetGaiaUserAccountId(profile()));
EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
+ ash::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
IsAssistantAllowedForProfile(profile()));
}
@@ -291,7 +291,7 @@
GetGaiaUserAccountId(profile()),
user_manager::USER_TYPE_CHILD);
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::ALLOWED,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::ALLOWED,
IsAssistantAllowedForProfile(profile()));
}
@@ -300,7 +300,7 @@
GetGuestAccountId(), user_manager::USER_TYPE_GUEST);
EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
+ ash::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
IsAssistantAllowedForProfile(profile()));
}
@@ -313,7 +313,7 @@
ScopedLogIn login(GetFakeUserManager(), identity_test_env(),
GetGaiaUserAccountId(profile()));
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_LOCALE,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_LOCALE,
IsAssistantAllowedForProfile(profile()));
icu::Locale::setDefault(old_locale, error_code);
}
@@ -324,7 +324,7 @@
ScopedLogIn login(GetFakeUserManager(), identity_test_env(),
GetNonGaiaUserAccountId(profile()),
user_manager::USER_TYPE_PUBLIC_ACCOUNT);
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_DEMO_MODE,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_DEMO_MODE,
IsAssistantAllowedForProfile(profile()));
ash::DemoSession::SetDemoConfigForTesting(
@@ -335,9 +335,8 @@
ScopedLogIn login(GetFakeUserManager(), identity_test_env(),
GetNonGaiaUserAccountId(profile()),
user_manager::USER_TYPE_PUBLIC_ACCOUNT);
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_PUBLIC_SESSION,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_PUBLIC_SESSION,
+ IsAssistantAllowedForProfile(profile()));
}
TEST_F(ChromeAssistantUtilTest, IsAssistantAllowedForProfile_NonGmail) {
@@ -345,16 +344,15 @@
GetFakeUserManager(), identity_test_env(),
GetGaiaUserAccountId("[email protected]", "0123456789"));
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_ACCOUNT_TYPE,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_ACCOUNT_TYPE,
+ IsAssistantAllowedForProfile(profile()));
}
TEST_F(ChromeAssistantUtilTest, IsAssistantAllowedForProfile_GoogleMail) {
ScopedLogIn login(GetFakeUserManager(), identity_test_env(),
GetGaiaUserAccountId("[email protected]", "0123456789"));
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::ALLOWED,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::ALLOWED,
IsAssistantAllowedForProfile(profile()));
}
@@ -365,7 +363,7 @@
GetGaiaUserAccountId("[email protected]", "0123456789"));
ScopedSpoofGoogleBrandedDevice make_google_branded_device;
- EXPECT_EQ(chromeos::assistant::AssistantAllowedState::ALLOWED,
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::ALLOWED,
IsAssistantAllowedForProfile(profile()));
}
@@ -375,9 +373,8 @@
GetActiveDirectoryUserAccountId(profile()),
user_manager::USER_TYPE_ACTIVE_DIRECTORY);
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_ACCOUNT_TYPE,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_ACCOUNT_TYPE,
+ IsAssistantAllowedForProfile(profile()));
}
TEST_F(ChromeAssistantUtilTest, IsAssistantAllowedForKiosk_KioskApp) {
@@ -385,9 +382,8 @@
GetNonGaiaUserAccountId(profile()),
user_manager::USER_TYPE_KIOSK_APP);
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
+ IsAssistantAllowedForProfile(profile()));
}
TEST_F(ChromeAssistantUtilTest, IsAssistantAllowedForKiosk_ArcKioskApp) {
@@ -395,9 +391,8 @@
GetNonGaiaUserAccountId(profile()),
user_manager::USER_TYPE_ARC_KIOSK_APP);
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
+ IsAssistantAllowedForProfile(profile()));
}
TEST_F(ChromeAssistantUtilTest, IsAssistantAllowedForKiosk_WebKioskApp) {
@@ -405,9 +400,8 @@
GetNonGaiaUserAccountId(profile()),
user_manager::USER_TYPE_WEB_KIOSK_APP);
- EXPECT_EQ(
- chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
- IsAssistantAllowedForProfile(profile()));
+ EXPECT_EQ(ash::assistant::AssistantAllowedState::DISALLOWED_BY_KIOSK_MODE,
+ IsAssistantAllowedForProfile(profile()));
}
} // namespace assistant
diff --git a/chrome/browser/ash/login/screens/assistant_optin_flow_screen.cc b/chrome/browser/ash/login/screens/assistant_optin_flow_screen.cc
index 454890a..da2df576 100644
--- a/chrome/browser/ash/login/screens/assistant_optin_flow_screen.cc
+++ b/chrome/browser/ash/login/screens/assistant_optin_flow_screen.cc
@@ -62,7 +62,7 @@
if (::assistant::IsAssistantAllowedForProfile(
ProfileManager::GetActiveUserProfile()) ==
- chromeos::assistant::AssistantAllowedState::ALLOWED) {
+ assistant::AssistantAllowedState::ALLOWED) {
return false;
}
diff --git a/chrome/browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc b/chrome/browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc
index 3323a4b..1ae1039 100644
--- a/chrome/browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc
+++ b/chrome/browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc
@@ -49,9 +49,6 @@
namespace ash {
-// TODO(https://crbug.com/1164001): remove when migrated to ash::
-namespace assistant = ::chromeos::assistant;
-
namespace {
using ::net::test_server::BasicHttpResponse;
@@ -109,7 +106,7 @@
constexpr char kAssistantOptInScreenStepCompletionTime[] =
"OOBE.StepCompletionTime.Assistant-optin-flow";
-class ScopedAssistantSettings : public chromeos::assistant::AssistantSettings {
+class ScopedAssistantSettings : public assistant::AssistantSettings {
public:
// Flags to configure GetSettings response.
static constexpr int CONSENT_UI_FLAGS_NONE = 0;
@@ -191,7 +188,7 @@
speaker_id_enrollment_state_ = SpeakerIdEnrollmentState::IDLE;
}
- // chromeos::assistant::AssistantSettings:
+ // assistant::AssistantSettings:
void GetSettings(const std::string& selector,
GetSettingsCallback callback) override {}
@@ -201,7 +198,7 @@
ASSERT_TRUE(selector_proto.ParseFromString(selector));
EXPECT_FALSE(selector_proto.about_me_settings());
EXPECT_TRUE(selector_proto.has_consent_flow_ui_selector());
- EXPECT_EQ(assistant::ActivityControlSettingsUiSelector::
+ EXPECT_EQ(chromeos::assistant::ActivityControlSettingsUiSelector::
ASSISTANT_SUW_ONBOARDING_ON_CHROME_OS,
selector_proto.consent_flow_ui_selector().flow_id());
@@ -276,12 +273,12 @@
update_proto.consent_flow_ui_update().consent_token());
EXPECT_FALSE(
update_proto.consent_flow_ui_update().saw_third_party_disclosure());
- EXPECT_EQ(assistant::ActivityControlSettingsUiSelector::
+ EXPECT_EQ(chromeos::assistant::ActivityControlSettingsUiSelector::
ASSISTANT_SUW_ONBOARDING_ON_CHROME_OS,
update_proto.consent_flow_ui_update().flow_id());
collected_optins_.insert(OptIn::ACTIVITY_CONTROL);
update_result.mutable_consent_flow_update_result()->set_update_status(
- assistant::ConsentFlowUiUpdateResult::SUCCESS);
+ chromeos::assistant::ConsentFlowUiUpdateResult::SUCCESS);
}
std::string message;
EXPECT_TRUE(update_result.SerializeToString(&message));
@@ -290,8 +287,7 @@
void StartSpeakerIdEnrollment(
bool skip_cloud_enrollment,
- base::WeakPtr<chromeos::assistant::SpeakerIdEnrollmentClient> client)
- override {
+ base::WeakPtr<assistant::SpeakerIdEnrollmentClient> client) override {
if (speaker_id_enrollment_mode_ == SpeakerIdEnrollmentMode::IMMEDIATE) {
client->OnSpeakerIdEnrollmentDone();
return;
@@ -474,8 +470,7 @@
IN_PROC_BROWSER_TEST_F(AssistantOptInFlowTest, Basic) {
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -514,8 +509,7 @@
IN_PROC_BROWSER_TEST_F(AssistantOptInFlowTest, DisableScreenContext) {
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -555,8 +549,7 @@
OobeScreenWaiter screen_waiter(AssistantOptInFlowScreenView::kScreenId);
screen_waiter.Wait();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
test::OobeJS().CreateVisibilityWaiter(true, kAssistantValueProp)->Wait();
TapWhenEnabled(kValuePropNextButton);
@@ -589,8 +582,7 @@
ShowAssistantOptInFlowScreen();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
OobeScreenWaiter screen_waiter(AssistantOptInFlowScreenView::kScreenId);
screen_waiter.Wait();
@@ -627,8 +619,7 @@
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
SetUpAssistantScreensForTest();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShowAssistantOptInFlowScreen();
@@ -659,8 +650,7 @@
ScopedAssistantSettings::CONSENT_UI_FLAG_SKIP_ACTIVITY_CONTROL);
SetUpAssistantScreensForTest();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShowAssistantOptInFlowScreen();
@@ -696,8 +686,7 @@
ScopedAssistantSettings::SpeakerIdEnrollmentMode::STEP_BY_STEP);
SetUpAssistantScreensForTest();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShowAssistantOptInFlowScreen();
@@ -766,8 +755,7 @@
ScopedAssistantSettings::SpeakerIdEnrollmentMode::STEP_BY_STEP);
SetUpAssistantScreensForTest();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShowAssistantOptInFlowScreen();
@@ -814,8 +802,7 @@
ScopedAssistantSettings::SpeakerIdEnrollmentMode::STEP_BY_STEP);
SetUpAssistantScreensForTest();
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
ShowAssistantOptInFlowScreen();
@@ -867,8 +854,7 @@
assistant_settings_->set_consent_ui_flags(
ScopedAssistantSettings::CONSENT_UI_FLAG_WAA_DISABLED_BY_POLICY);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -891,8 +877,7 @@
assistant_settings_->set_consent_ui_flags(
ScopedAssistantSettings::CONSENT_UI_FLAG_ASSISTANT_DISABLED_BY_POLICY);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -913,8 +898,7 @@
IN_PROC_BROWSER_TEST_F(AssistantOptInFlowTest, AssistantSkippedNoLib) {
auto force_lib_assistant_disabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(false);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -943,8 +927,7 @@
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
assistant_settings_->set_setting_zippy_size(2);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -989,8 +972,7 @@
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
assistant_settings_->set_setting_zippy_size(2);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -1021,8 +1003,7 @@
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
assistant_settings_->set_setting_zippy_size(2);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
@@ -1059,8 +1040,7 @@
auto force_lib_assistant_enabled =
AssistantOptInFlowScreen::ForceLibAssistantEnabledForTesting(true);
assistant_settings_->set_setting_zippy_size(2);
- AssistantState::Get()->NotifyStatusChanged(
- chromeos::assistant::AssistantStatus::READY);
+ AssistantState::Get()->NotifyStatusChanged(assistant::AssistantStatus::READY);
SetUpAssistantScreensForTest();
ShowAssistantOptInFlowScreen();
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc b/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
index 0f8c89a..2508b42e 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
+++ b/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
@@ -118,11 +118,11 @@
!ui::DeviceDataManager::GetInstance()->GetTouchscreenDevices().empty());
// Checks if the Google Assistant is allowed on this device by going through
// policies.
- chromeos::assistant::AssistantAllowedState assistant_allowed_state =
- assistant::IsAssistantAllowedForProfile(profile);
- source->AddBoolean("assistantAllowed",
- assistant_allowed_state ==
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ assistant::AssistantAllowedState assistant_allowed_state =
+ ::assistant::IsAssistantAllowedForProfile(profile);
+ source->AddBoolean(
+ "assistantAllowed",
+ assistant_allowed_state == assistant::AssistantAllowedState::ALLOWED);
source->AddBoolean("assistantEnabled",
AssistantState::Get()->settings_enabled().value_or(false));
source->AddBoolean("playStoreEnabled",
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
index 75975b4..4e2acc7 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -587,24 +587,23 @@
settings_api::PrefType::PREF_TYPE_NUMBER;
// Google Assistant.
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantConsentStatus] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantConsentStatus] =
settings_api::PrefType::PREF_TYPE_NUMBER;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantDisabledByPolicy] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantDisabledByPolicy] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantEnabled] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantContextEnabled] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantContextEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantHotwordAlwaysOn] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantHotwordAlwaysOn] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantHotwordEnabled] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantHotwordEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)
- [chromeos::assistant::prefs::kAssistantVoiceMatchEnabledDuringOobe] =
- settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantLaunchWithMicOpen] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantVoiceMatchEnabledDuringOobe] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
- (*s_allowlist)[chromeos::assistant::prefs::kAssistantNotificationEnabled] =
+ (*s_allowlist)[ash::assistant::prefs::kAssistantLaunchWithMicOpen] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[ash::assistant::prefs::kAssistantNotificationEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
// Quick Answers.
@@ -1256,7 +1255,7 @@
bool PrefsUtil::IsHotwordDisabledForChildUser(const std::string& pref_name) {
const std::string& hotwordEnabledPref =
- chromeos::assistant::prefs::kAssistantHotwordEnabled;
+ ash::assistant::prefs::kAssistantHotwordEnabled;
if (!profile_->IsChild() || pref_name != hotwordEnabledPref)
return false;
diff --git a/chrome/browser/metrics/assistant_service_metrics_provider.cc b/chrome/browser/metrics/assistant_service_metrics_provider.cc
index aa896949..633a4b8 100644
--- a/chrome/browser/metrics/assistant_service_metrics_provider.cc
+++ b/chrome/browser/metrics/assistant_service_metrics_provider.cc
@@ -17,17 +17,17 @@
metrics::ChromeUserMetricsExtension* uma_proto_unused) {
if (assistant::IsAssistantAllowedForProfile(
ProfileManager::GetActiveUserProfile()) !=
- chromeos::assistant::AssistantAllowedState::ALLOWED) {
+ ash::assistant::AssistantAllowedState::ALLOWED) {
return;
}
UMA_HISTOGRAM_BOOLEAN(
"Assistant.ServiceEnabledUserCount",
ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantEnabled));
+ ash::assistant::prefs::kAssistantEnabled));
UMA_HISTOGRAM_BOOLEAN(
"Assistant.ContextEnabledUserCount",
ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
- chromeos::assistant::prefs::kAssistantContextEnabled));
+ ash::assistant::prefs::kAssistantContextEnabled));
}
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index 12e43f47..55fa452 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -1118,16 +1118,16 @@
plugin_vm::prefs::kPluginVmRequiredFreeDiskSpaceGB,
base::Value::Type::INTEGER },
{ key::kAssistantOnboardingMode,
- chromeos::assistant::prefs::kAssistantOnboardingMode,
+ ash::assistant::prefs::kAssistantOnboardingMode,
base::Value::Type::STRING },
{ key::kAssistantVoiceMatchEnabledDuringOobe,
- chromeos::assistant::prefs::kAssistantVoiceMatchEnabledDuringOobe,
+ ash::assistant::prefs::kAssistantVoiceMatchEnabledDuringOobe,
base::Value::Type::BOOLEAN },
{ key::kVoiceInteractionContextEnabled,
- chromeos::assistant::prefs::kAssistantContextEnabled,
+ ash::assistant::prefs::kAssistantContextEnabled,
base::Value::Type::BOOLEAN },
{ key::kVoiceInteractionHotwordEnabled,
- chromeos::assistant::prefs::kAssistantHotwordEnabled,
+ ash::assistant::prefs::kAssistantHotwordEnabled,
base::Value::Type::BOOLEAN },
{ key::kDevicePowerPeakShiftEnabled,
ash::prefs::kPowerPeakShiftEnabled,
diff --git a/chrome/browser/policy/test/assistant_policy_browsertest.cc b/chrome/browser/policy/test/assistant_policy_browsertest.cc
index 295ee564..2325855 100644
--- a/chrome/browser/policy/test/assistant_policy_browsertest.cc
+++ b/chrome/browser/policy/test/assistant_policy_browsertest.cc
@@ -18,12 +18,12 @@
IN_PROC_BROWSER_TEST_F(AssistantPolicyTest, AssistantContextEnabled) {
PrefService* prefs = browser()->profile()->GetPrefs();
EXPECT_FALSE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantContextEnabled));
+ ash::assistant::prefs::kAssistantContextEnabled));
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled, true);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantContextEnabled, true);
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
// Verifies that the Assistant context can be forced to always disabled.
PolicyMap policies;
@@ -32,12 +32,12 @@
nullptr);
UpdateProviderPolicy(policies);
EXPECT_TRUE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantContextEnabled));
+ ash::assistant::prefs::kAssistantContextEnabled));
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled, true);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantContextEnabled, true);
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
// Verifies that the Assistant context can be forced to always enabled.
policies.Set(key::kVoiceInteractionContextEnabled, POLICY_LEVEL_MANDATORY,
@@ -45,24 +45,23 @@
nullptr);
UpdateProviderPolicy(policies);
EXPECT_TRUE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantContextEnabled));
+ ash::assistant::prefs::kAssistantContextEnabled));
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled,
- false);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantContextEnabled, false);
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantContextEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantContextEnabled));
}
IN_PROC_BROWSER_TEST_F(AssistantPolicyTest, AssistantHotwordEnabled) {
PrefService* prefs = browser()->profile()->GetPrefs();
EXPECT_FALSE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ ash::assistant::prefs::kAssistantHotwordEnabled));
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled, true);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled, true);
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
// Verifies that the Assistant hotword can be forced to always disabled.
PolicyMap policies;
@@ -71,12 +70,12 @@
nullptr);
UpdateProviderPolicy(policies);
EXPECT_TRUE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ ash::assistant::prefs::kAssistantHotwordEnabled));
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled, true);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled, true);
EXPECT_FALSE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
// Verifies that the Assistant hotword can be forced to always enabled.
policies.Set(key::kVoiceInteractionHotwordEnabled, POLICY_LEVEL_MANDATORY,
@@ -84,13 +83,12 @@
nullptr);
UpdateProviderPolicy(policies);
EXPECT_TRUE(prefs->IsManagedPreference(
- chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ ash::assistant::prefs::kAssistantHotwordEnabled));
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
- prefs->SetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled,
- false);
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->SetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled, false);
EXPECT_TRUE(
- prefs->GetBoolean(chromeos::assistant::prefs::kAssistantHotwordEnabled));
+ prefs->GetBoolean(ash::assistant::prefs::kAssistantHotwordEnabled));
}
} // namespace policy
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index b290799..5fe15ec 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1511,7 +1511,7 @@
ash::ApkWebAppService::RegisterProfilePrefs(registry);
ash::app_time::AppActivityRegistry::RegisterProfilePrefs(registry);
ash::app_time::AppTimeController::RegisterProfilePrefs(registry);
- chromeos::assistant::prefs::RegisterProfilePrefs(registry);
+ ash::assistant::prefs::RegisterProfilePrefs(registry);
ash::bluetooth::DebugLogsManager::RegisterPrefs(registry);
chromeos::bluetooth_config::BluetoothPowerControllerImpl::
RegisterProfilePrefs(registry);
diff --git a/chrome/browser/ui/app_list/search/assistant_text_search_provider.cc b/chrome/browser/ui/app_list/search/assistant_text_search_provider.cc
index 90f78a25..4a118cc 100644
--- a/chrome/browser/ui/app_list/search/assistant_text_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/assistant_text_search_provider.cc
@@ -27,7 +27,7 @@
namespace {
-using chromeos::assistant::AssistantAllowedState;
+using ::ash::assistant::AssistantAllowedState;
constexpr char kIdPrefix[] = "googleassistant_text://";
@@ -113,7 +113,7 @@
}
void AssistantTextSearchProvider::OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState allowed_state) {
+ AssistantAllowedState allowed_state) {
UpdateResults();
}
diff --git a/chrome/browser/ui/app_list/search/assistant_text_search_provider.h b/chrome/browser/ui/app_list/search/assistant_text_search_provider.h
index f5a0033..cfb3ff90 100644
--- a/chrome/browser/ui/app_list/search/assistant_text_search_provider.h
+++ b/chrome/browser/ui/app_list/search/assistant_text_search_provider.h
@@ -40,7 +40,7 @@
// ash::AssistantStateObserver:
void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState allowed_state) override;
+ ash::assistant::AssistantAllowedState allowed_state) override;
void OnAssistantSettingsEnabled(bool enabled) override;
// Invoke to update results based on current state.
diff --git a/chrome/browser/ui/app_list/search/assistant_text_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/assistant_text_search_provider_unittest.cc
index 441523a..e9c81da 100644
--- a/chrome/browser/ui/app_list/search/assistant_text_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/assistant_text_search_provider_unittest.cc
@@ -21,7 +21,7 @@
namespace app_list {
namespace {
-using chromeos::assistant::AssistantAllowedState;
+using ::ash::assistant::AssistantAllowedState;
// Parameterized by feature ProductivityLauncher.
class AssistantTextSearchProviderTest
diff --git a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc
index e38c5d49..7892a10 100644
--- a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc
@@ -59,7 +59,7 @@
void AssistantBrowserDelegateImpl::MaybeInit(Profile* profile) {
if (assistant::IsAssistantAllowedForProfile(profile) !=
- chromeos::assistant::AssistantAllowedState::ALLOWED) {
+ ash::assistant::AssistantAllowedState::ALLOWED) {
return;
}
@@ -98,11 +98,11 @@
if (!initialized_)
return;
- chromeos::assistant::AssistantService::Get()->Shutdown();
+ ash::assistant::AssistantService::Get()->Shutdown();
}
void AssistantBrowserDelegateImpl::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus new_status) {
+ ash::assistant::AssistantStatus new_status) {
ash::AssistantState::Get()->NotifyStatusChanged(new_status);
}
@@ -214,7 +214,7 @@
}
void AssistantBrowserDelegateImpl::OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState allowed_state) {
+ ash::assistant::AssistantAllowedState allowed_state) {
Profile* profile = ProfileManager::GetActiveUserProfile();
MaybeInit(profile);
diff --git a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h
index 305117f..31158bc5 100644
--- a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h
+++ b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h
@@ -26,7 +26,7 @@
// Class to handle all Assistant in-browser-process functionalities.
class AssistantBrowserDelegateImpl
- : public chromeos::assistant::AssistantBrowserDelegate,
+ : public ash::assistant::AssistantBrowserDelegate,
public signin::IdentityManager::Observer,
public session_manager::SessionManagerObserver,
public ash::AssistantStateObserver {
@@ -42,7 +42,7 @@
// chromeos::assistant::AssisantClient overrides:
void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus new_status) override;
+ ash::assistant::AssistantStatus new_status) override;
void RequestAssistantVolumeControl(
mojo::PendingReceiver<ash::mojom::AssistantVolumeControl> receiver)
override;
@@ -87,7 +87,7 @@
// ash::AssistantStateObserver:
void OnAssistantFeatureAllowedChanged(
- chromeos::assistant::AssistantAllowedState allowed_state) override;
+ ash::assistant::AssistantAllowedState allowed_state) override;
// Called when the application is terminating
void OnAppTerminating();
diff --git a/chrome/browser/ui/ash/assistant/assistant_browsertest.cc b/chrome/browser/ui/ash/assistant/assistant_browsertest.cc
index f7b7462d..134d585 100644
--- a/chrome/browser/ui/ash/assistant/assistant_browsertest.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_browsertest.cc
@@ -58,7 +58,7 @@
AssistantBrowserTest() {
// TODO(b/190633242): enable sandbox in browser tests.
feature_list_.InitAndDisableFeature(
- chromeos::assistant::features::kEnableLibAssistantSandbox);
+ ash::assistant::features::kEnableLibAssistantSandbox);
// Do not log to file in test. Otherwise multiple tests may create/delete
// the log file at the same time. See http://crbug.com/1307868.
diff --git a/chrome/browser/ui/ash/assistant/assistant_setup.cc b/chrome/browser/ui/ash/assistant/assistant_setup.cc
index 12e17bb..3b291a9 100644
--- a/chrome/browser/ui/ash/assistant/assistant_setup.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_setup.cc
@@ -37,7 +37,7 @@
AssistantSetup::AssistantSetup() {
DCHECK(assistant::IsAssistantAllowedForProfile(
ProfileManager::GetActiveUserProfile()) ==
- chromeos::assistant::AssistantAllowedState::ALLOWED);
+ ash::assistant::AssistantAllowedState::ALLOWED);
ash::AssistantState::Get()->AddObserver(this);
search_and_assistant_enabled_checker_ =
@@ -64,7 +64,7 @@
void AssistantSetup::MaybeStartAssistantOptInFlow() {
DCHECK(Prefs());
if (!Prefs()->GetUserPrefValue(
- chromeos::assistant::prefs::kAssistantConsentStatus)) {
+ ash::assistant::prefs::kAssistantConsentStatus)) {
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(&AssistantSetup::StartAssistantOptInFlow,
@@ -77,24 +77,24 @@
// When there is an error, default the pref to false if the pref is not set
// yet. The pref value will be synced the next time.
if (!Prefs()->GetUserPrefValue(
- chromeos::assistant::prefs::kAssistantDisabledByPolicy)) {
- Prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantDisabledByPolicy,
+ ash::assistant::prefs::kAssistantDisabledByPolicy)) {
+ Prefs()->SetBoolean(ash::assistant::prefs::kAssistantDisabledByPolicy,
false);
}
}
void AssistantSetup::OnSearchAndAssistantStateReceived(bool is_disabled) {
- Prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantDisabledByPolicy,
+ Prefs()->SetBoolean(ash::assistant::prefs::kAssistantDisabledByPolicy,
is_disabled);
if (is_disabled) {
DVLOG(1) << "Assistant is disabled by domain policy.";
- Prefs()->SetBoolean(chromeos::assistant::prefs::kAssistantEnabled, false);
+ Prefs()->SetBoolean(ash::assistant::prefs::kAssistantEnabled, false);
}
}
void AssistantSetup::OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) {
- if (status == chromeos::assistant::AssistantStatus::NOT_READY)
+ ash::assistant::AssistantStatus status) {
+ if (status == ash::assistant::AssistantStatus::NOT_READY)
return;
SyncSettingsState();
@@ -107,7 +107,7 @@
consent_flow_ui->set_flow_id(
chromeos::assistant::ActivityControlSettingsUiSelector::
ASSISTANT_SUW_ONBOARDING_ON_CHROME_OS);
- chromeos::assistant::AssistantSettings::Get()->GetSettings(
+ ash::assistant::AssistantSettings::Get()->GetSettings(
selector.SerializeAsString(),
base::BindOnce(&AssistantSetup::OnGetSettingsResponse,
base::Unretained(this)));
@@ -129,29 +129,27 @@
case ConsentFlowUi::ASK_FOR_CONSENT:
if (consent_ui.has_activity_control_ui() &&
consent_ui.activity_control_ui().setting_zippy().size()) {
- Prefs()->SetInteger(
- chromeos::assistant::prefs::kAssistantConsentStatus,
- chromeos::assistant::prefs::ConsentStatus::kNotFound);
+ Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus,
+ ash::assistant::prefs::ConsentStatus::kNotFound);
} else {
- Prefs()->SetInteger(chromeos::assistant::prefs::kAssistantConsentStatus,
- chromeos::assistant::prefs::ConsentStatus::
- kActivityControlAccepted);
+ Prefs()->SetInteger(
+ ash::assistant::prefs::kAssistantConsentStatus,
+ ash::assistant::prefs::ConsentStatus::kActivityControlAccepted);
}
break;
case ConsentFlowUi::ERROR_ACCOUNT:
- Prefs()->SetInteger(
- chromeos::assistant::prefs::kAssistantConsentStatus,
- chromeos::assistant::prefs::ConsentStatus::kUnauthorized);
+ Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus,
+ ash::assistant::prefs::ConsentStatus::kUnauthorized);
break;
case ConsentFlowUi::ALREADY_CONSENTED:
Prefs()->SetInteger(
- chromeos::assistant::prefs::kAssistantConsentStatus,
- chromeos::assistant::prefs::ConsentStatus::kActivityControlAccepted);
+ ash::assistant::prefs::kAssistantConsentStatus,
+ ash::assistant::prefs::ConsentStatus::kActivityControlAccepted);
break;
case ConsentFlowUi::UNSPECIFIED:
case ConsentFlowUi::ERROR:
- Prefs()->SetInteger(chromeos::assistant::prefs::kAssistantConsentStatus,
- chromeos::assistant::prefs::ConsentStatus::kUnknown);
+ Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus,
+ ash::assistant::prefs::ConsentStatus::kUnknown);
LOG(ERROR) << "Invalid activity control consent status.";
}
}
diff --git a/chrome/browser/ui/ash/assistant/assistant_setup.h b/chrome/browser/ui/ash/assistant/assistant_setup.h
index 2165ee36..f7962c6 100644
--- a/chrome/browser/ui/ash/assistant/assistant_setup.h
+++ b/chrome/browser/ui/ash/assistant/assistant_setup.h
@@ -44,7 +44,7 @@
private:
// ash::AssistantStateObserver:
void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override;
+ ash::assistant::AssistantStatus status) override;
void SyncSettingsState();
void OnGetSettingsResponse(const std::string& settings);
diff --git a/chrome/browser/ui/ash/assistant/assistant_state_client.cc b/chrome/browser/ui/ash/assistant/assistant_state_client.cc
index cb84392..fbb3e02 100644
--- a/chrome/browser/ui/ash/assistant/assistant_state_client.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_state_client.cc
@@ -32,7 +32,7 @@
void AssistantStateClient::NotifyFeatureAllowed() {
DCHECK(profile_);
- chromeos::assistant::AssistantAllowedState state =
+ ash::assistant::AssistantAllowedState state =
assistant::IsAssistantAllowedForProfile(profile_);
ash::AssistantState::Get()->NotifyFeatureAllowed(state);
}
@@ -88,7 +88,7 @@
base::Unretained(this)));
pref_change_registrar_->Add(
- chromeos::assistant::prefs::kAssistantDisabledByPolicy,
+ ash::assistant::prefs::kAssistantDisabledByPolicy,
base::BindRepeating(&AssistantStateClient::NotifyFeatureAllowed,
base::Unretained(this)));
diff --git a/chrome/browser/ui/ash/assistant/assistant_test_mixin.cc b/chrome/browser/ui/ash/assistant/assistant_test_mixin.cc
index 3f81e02..080e02e 100644
--- a/chrome/browser/ui/ash/assistant/assistant_test_mixin.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_test_mixin.cc
@@ -51,7 +51,7 @@
class AssistantStatusWaiter : private ash::AssistantStateObserver {
public:
AssistantStatusWaiter(ash::AssistantState* state,
- chromeos::assistant::AssistantStatus expected_status)
+ ash::assistant::AssistantStatus expected_status)
: state_(state), expected_status_(expected_status) {
state_->AddObserver(this);
}
@@ -74,13 +74,13 @@
private:
void OnAssistantStatusChanged(
- chromeos::assistant::AssistantStatus status) override {
+ ash::assistant::AssistantStatus status) override {
if (status == expected_status_ && quit_loop_)
std::move(quit_loop_).Run();
}
ash::AssistantState* const state_;
- chromeos::assistant::AssistantStatus const expected_status_;
+ ash::assistant::AssistantStatus const expected_status_;
base::OnceClosure quit_loop_;
};
@@ -420,7 +420,7 @@
SetPreferVoice(false);
AssistantStatusWaiter waiter(test_api_->GetAssistantState(),
- chromeos::assistant::AssistantStatus::READY);
+ ash::assistant::AssistantStatus::READY);
waiter.RunUntilExpectedStatus();
}
@@ -591,7 +591,7 @@
// Then wait for the Service to shutdown.
AssistantStatusWaiter waiter(test_api_->GetAssistantState(),
- chromeos::assistant::AssistantStatus::NOT_READY);
+ ash::assistant::AssistantStatus::NOT_READY);
waiter.RunUntilExpectedStatus();
}
diff --git a/chrome/browser/ui/ash/assistant/assistant_timers_browsertest.cc b/chrome/browser/ui/ash/assistant/assistant_timers_browsertest.cc
index fda4c65..51c9abb 100644
--- a/chrome/browser/ui/ash/assistant/assistant_timers_browsertest.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_timers_browsertest.cc
@@ -195,7 +195,7 @@
AssistantTimersBrowserTest() {
// TODO(b/190633242): enable sandbox in browser tests.
feature_list_.InitAndDisableFeature(
- chromeos::assistant::features::kEnableLibAssistantSandbox);
+ ash::assistant::features::kEnableLibAssistantSandbox);
// Do not log to file in test. Otherwise multiple tests may create/delete
// the log file at the same time. See http://crbug.com/1307868.
diff --git a/chrome/browser/ui/ash/assistant/device_actions.cc b/chrome/browser/ui/ash/assistant/device_actions.cc
index c8ae9b4..582e785 100644
--- a/chrome/browser/ui/ash/assistant/device_actions.cc
+++ b/chrome/browser/ui/ash/assistant/device_actions.cc
@@ -101,8 +101,7 @@
}
void NotifyAndroidAppListRefreshed(
- base::ObserverList<chromeos::assistant::AppListEventSubscriber>*
- subscribers) {
+ base::ObserverList<ash::assistant::AppListEventSubscriber>* subscribers) {
std::vector<AndroidAppInfo> android_apps_info = GetAppsInfo();
for (auto& subscriber : *subscribers)
subscriber.OnAndroidAppListRefreshed(android_apps_info);
@@ -232,7 +231,7 @@
}
void DeviceActions::AddAndFireAppListEventSubscriber(
- chromeos::assistant::AppListEventSubscriber* subscriber) {
+ ash::assistant::AppListEventSubscriber* subscriber) {
auto* prefs = ArcAppListPrefs::Get(ProfileManager::GetActiveUserProfile());
if (prefs && prefs->package_list_initial_refreshed()) {
std::vector<AndroidAppInfo> android_apps_info = GetAppsInfo();
@@ -246,7 +245,7 @@
}
void DeviceActions::RemoveAppListEventSubscriber(
- chromeos::assistant::AppListEventSubscriber* subscriber) {
+ ash::assistant::AppListEventSubscriber* subscriber) {
app_list_subscribers_.RemoveObserver(subscriber);
}
diff --git a/chrome/browser/ui/ash/assistant/device_actions.h b/chrome/browser/ui/ash/assistant/device_actions.h
index c79ef5ae..2019fb0 100644
--- a/chrome/browser/ui/ash/assistant/device_actions.h
+++ b/chrome/browser/ui/ash/assistant/device_actions.h
@@ -21,7 +21,7 @@
#include "mojo/public/cpp/bindings/remote_set.h"
class DeviceActions : public ash::AndroidIntentHelper,
- public chromeos::assistant::DeviceActions,
+ public ash::assistant::DeviceActions,
public ArcAppListPrefs::Observer {
public:
explicit DeviceActions(std::unique_ptr<DeviceActionsDelegate> delegate);
@@ -31,7 +31,7 @@
~DeviceActions() override;
- // chromeos::assistant::DeviceActions overrides:
+ // ash::assistant::DeviceActions overrides:
void SetWifiEnabled(bool enabled) override;
void SetBluetoothEnabled(bool enabled) override;
void GetScreenBrightnessLevel(
@@ -45,9 +45,9 @@
const chromeos::assistant::AndroidAppInfo& app_info) override;
void LaunchAndroidIntent(const std::string& intent) override;
void AddAndFireAppListEventSubscriber(
- chromeos::assistant::AppListEventSubscriber* subscriber) override;
+ ash::assistant::AppListEventSubscriber* subscriber) override;
void RemoveAppListEventSubscriber(
- chromeos::assistant::AppListEventSubscriber* subscriber) override;
+ ash::assistant::AppListEventSubscriber* subscriber) override;
// ash::AndroidIntentHelper overrides:
absl::optional<std::string> GetAndroidAppLaunchIntent(
@@ -64,7 +64,7 @@
base::ScopedMultiSourceObservation<ArcAppListPrefs, ArcAppListPrefs::Observer>
scoped_prefs_observations_{this};
- base::ObserverList<chromeos::assistant::AppListEventSubscriber>
+ base::ObserverList<ash::assistant::AppListEventSubscriber>
app_list_subscribers_;
mojo::Remote<chromeos::bluetooth_config::mojom::CrosBluetoothConfig>
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 5ae33e5..b70e755f 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -258,7 +258,7 @@
}
if (assistant::IsAssistantAllowedForProfile(profile) ==
- chromeos::assistant::AssistantAllowedState::ALLOWED) {
+ ash::assistant::AssistantAllowedState::ALLOWED) {
ash::AssistantState::Get()->NotifyLockedFullScreenStateChanged(locked);
}
}
diff --git a/chromeos/ash/services/assistant/device_settings_host.h b/chromeos/ash/services/assistant/device_settings_host.h
index 999e769..ef46bbd 100644
--- a/chromeos/ash/services/assistant/device_settings_host.h
+++ b/chromeos/ash/services/assistant/device_settings_host.h
@@ -6,6 +6,8 @@
#define CHROMEOS_ASH_SERVICES_ASSISTANT_DEVICE_SETTINGS_HOST_H_
#include "base/component_export.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
+#include "chromeos/ash/services/assistant/public/cpp/device_actions.h"
#include "chromeos/services/libassistant/public/mojom/device_settings_delegate.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
@@ -17,7 +19,6 @@
namespace chromeos {
namespace assistant {
-class DeviceActions;
class ServiceContext;
class COMPONENT_EXPORT(ASSISTANT_SERVICE) DeviceSettingsHost
diff --git a/chromeos/ash/services/assistant/media_host.h b/chromeos/ash/services/assistant/media_host.h
index 5fd4aca..2f89472 100644
--- a/chromeos/ash/services/assistant/media_host.h
+++ b/chromeos/ash/services/assistant/media_host.h
@@ -8,6 +8,10 @@
#include "base/component_export.h"
#include "base/observer_list.h"
#include "base/unguessable_token.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
+#include "chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
+#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h"
#include "chromeos/services/libassistant/public/mojom/media_controller.mojom-forward.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -17,8 +21,6 @@
namespace chromeos {
namespace assistant {
-class AssistantBrowserDelegate;
-class AssistantInteractionSubscriber;
class AssistantManagerServiceImpl;
class AssistantMediaSession;
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.cc b/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.cc
index 3c288a4..5501de8 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.cc
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.cc
@@ -4,8 +4,7 @@
#include "chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
namespace {
@@ -29,5 +28,4 @@
g_instance = nullptr;
}
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h b/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h
index 5a106aa..36735f73 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h
@@ -24,8 +24,7 @@
#include "chromeos/services/libassistant/public/mojom/service.mojom-forward.h"
#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
// Main interface implemented in browser to provide dependencies to
// |chromeos::assistant::Service|.
@@ -94,7 +93,11 @@
#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::AssistantBrowserDelegate;
+}
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_BROWSER_DELEGATE_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_enums.h b/chromeos/ash/services/assistant/public/cpp/assistant_enums.h
index 30560f5..b53f834 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_enums.h
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_enums.h
@@ -5,8 +5,7 @@
#ifndef CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_
#define CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
// The initial state is NOT_READY, after Assistant service started it becomes
// READY. When Assistant UI shows up the state becomes VISIBLE.
enum AssistantStatus {
@@ -133,7 +132,15 @@
kMaxValue = kLoaded,
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::AssistantAllowedState;
+using ::ash::assistant::AssistantInteractionResolution;
+using ::ash::assistant::AssistantStatus;
+using ::ash::assistant::LibassistantDlcInstallResult;
+using ::ash::assistant::LibassistantDlcLoadStatus;
+} // namespace chromeos::assistant
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_prefs.cc b/chromeos/ash/services/assistant/public/cpp/assistant_prefs.cc
index 99eb184..0a85872 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_prefs.cc
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_prefs.cc
@@ -7,9 +7,7 @@
#include "base/notreached.h"
#include "components/prefs/pref_registry_simple.h"
-namespace chromeos {
-namespace assistant {
-namespace prefs {
+namespace ash::assistant::prefs {
// NOTE: These values are persisted in preferences and cannot be changed.
const char kAssistantOnboardingModeDefault[] = "Default";
@@ -100,6 +98,4 @@
return std::string();
}
-} // namespace prefs
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::prefs
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_prefs.h b/chromeos/ash/services/assistant/public/cpp/assistant_prefs.h
index eeaaaca..beeac92 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_prefs.h
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_prefs.h
@@ -11,9 +11,7 @@
class PrefRegistrySimple;
-namespace chromeos {
-namespace assistant {
-namespace prefs {
+namespace ash::assistant::prefs {
// The status of the user's consent. The enum values cannot be changed because
// they are persisted on disk.
@@ -80,8 +78,11 @@
COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC)
std::string ToOnboardingModeString(AssistantOnboardingMode onboarding_mode);
-} // namespace prefs
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::prefs
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+namespace prefs = ::ash::assistant::prefs;
+}
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_PREFS_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_service.cc b/chromeos/ash/services/assistant/public/cpp/assistant_service.cc
index 412af1c9..8301217 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_service.cc
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_service.cc
@@ -4,8 +4,7 @@
#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
namespace {
@@ -28,5 +27,4 @@
g_instance = nullptr;
}
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_service.h b/chromeos/ash/services/assistant/public/cpp/assistant_service.h
index cff50fe..6a5a3e2 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_service.h
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_service.h
@@ -14,6 +14,8 @@
#include "chromeos/ash/services/assistant/public/cpp/assistant_enums.h"
#include "chromeos/ash/services/assistant/public/cpp/conversation_observer.h"
#include "chromeos/services/libassistant/public/cpp/android_app_info.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
+#include "chromeos/services/libassistant/public/cpp/assistant_feedback.h"
#include "chromeos/services/libassistant/public/cpp/assistant_interaction_metadata.h"
#include "chromeos/services/libassistant/public/cpp/assistant_notification.h"
#include "chromeos/services/libassistant/public/mojom/notification_delegate.mojom-forward.h"
@@ -22,10 +24,7 @@
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "ui/accessibility/mojom/ax_assistant_structure.mojom.h"
-namespace chromeos {
-namespace assistant {
-
-struct AssistantFeedback;
+namespace ash::assistant {
// Subscribes to Assistant's interaction event. These events are server driven
// in response to the user's direct interaction with the assistant. Responses
@@ -182,7 +181,13 @@
virtual Assistant* GetAssistant() = 0;
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::Assistant;
+using ::ash::assistant::AssistantInteractionSubscriber;
+using ::ash::assistant::AssistantService;
+} // namespace chromeos::assistant
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_SERVICE_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_settings.cc b/chromeos/ash/services/assistant/public/cpp/assistant_settings.cc
index eb8ceb8..1121cd3 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_settings.cc
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_settings.cc
@@ -4,8 +4,7 @@
#include "chromeos/ash/services/assistant/public/cpp/assistant_settings.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
namespace {
@@ -40,5 +39,4 @@
g_instance = nullptr;
}
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
diff --git a/chromeos/ash/services/assistant/public/cpp/assistant_settings.h b/chromeos/ash/services/assistant/public/cpp/assistant_settings.h
index ee329a1..942b0b8f 100644
--- a/chromeos/ash/services/assistant/public/cpp/assistant_settings.h
+++ b/chromeos/ash/services/assistant/public/cpp/assistant_settings.h
@@ -13,8 +13,7 @@
#include "chromeos/services/libassistant/public/mojom/speaker_id_enrollment_controller.mojom.h"
#include "mojo/public/cpp/bindings/receiver.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
class COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC) SpeakerIdEnrollmentClient
: public chromeos::libassistant::mojom::SpeakerIdEnrollmentClient {
@@ -78,7 +77,12 @@
virtual void SyncSpeakerIdEnrollmentStatus() = 0;
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::AssistantSettings;
+using ::ash::assistant::SpeakerIdEnrollmentClient;
+} // namespace chromeos::assistant
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_SETTINGS_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/conversation_observer.cc b/chromeos/ash/services/assistant/public/cpp/conversation_observer.cc
index f18971f..8ac2254 100644
--- a/chromeos/ash/services/assistant/public/cpp/conversation_observer.cc
+++ b/chromeos/ash/services/assistant/public/cpp/conversation_observer.cc
@@ -4,8 +4,7 @@
#include "chromeos/ash/services/assistant/public/cpp/conversation_observer.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
ConversationObserver::ConversationObserver() = default;
ConversationObserver::~ConversationObserver() = default;
@@ -17,5 +16,4 @@
return remote_observer_.BindNewPipeAndPassRemote();
}
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
diff --git a/chromeos/ash/services/assistant/public/cpp/conversation_observer.h b/chromeos/ash/services/assistant/public/cpp/conversation_observer.h
index 96cc8137..bb5f5f0 100644
--- a/chromeos/ash/services/assistant/public/cpp/conversation_observer.h
+++ b/chromeos/ash/services/assistant/public/cpp/conversation_observer.h
@@ -11,8 +11,7 @@
#include "chromeos/services/libassistant/public/mojom/conversation_observer.mojom.h"
#include "mojo/public/cpp/bindings/receiver.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
// Default implementation of |mojom::ConversationObserver|, which allow child
// child classes to only implement handlers they are interested in.
@@ -47,7 +46,11 @@
remote_observer_{this};
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::ConversationObserver;
+}
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_CONVERSATION_OBSERVER_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/device_actions.cc b/chromeos/ash/services/assistant/public/cpp/device_actions.cc
index eff2d063..1eb79f6f 100644
--- a/chromeos/ash/services/assistant/public/cpp/device_actions.cc
+++ b/chromeos/ash/services/assistant/public/cpp/device_actions.cc
@@ -4,8 +4,7 @@
#include "chromeos/ash/services/assistant/public/cpp/device_actions.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
namespace {
@@ -29,5 +28,4 @@
g_instance = nullptr;
}
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
diff --git a/chromeos/ash/services/assistant/public/cpp/device_actions.h b/chromeos/ash/services/assistant/public/cpp/device_actions.h
index 6230f27e..ee4bc28 100644
--- a/chromeos/ash/services/assistant/public/cpp/device_actions.h
+++ b/chromeos/ash/services/assistant/public/cpp/device_actions.h
@@ -13,8 +13,7 @@
#include "base/observer_list_types.h"
#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h"
-namespace chromeos {
-namespace assistant {
+namespace ash::assistant {
// Subscribes to App list events.
class COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC) AppListEventSubscriber
@@ -78,7 +77,12 @@
AppListEventSubscriber* subscriber) = 0;
};
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+using ::ash::assistant::AppListEventSubscriber;
+using ::ash::assistant::DeviceActions;
+} // namespace chromeos::assistant
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_DEVICE_ACTIONS_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/features.cc b/chromeos/ash/services/assistant/public/cpp/features.cc
index 63d37ea1..60006a9 100644
--- a/chromeos/ash/services/assistant/public/cpp/features.cc
+++ b/chromeos/ash/services/assistant/public/cpp/features.cc
@@ -7,9 +7,7 @@
#include "ash/constants/ash_features.h"
#include "base/feature_list.h"
-namespace chromeos {
-namespace assistant {
-namespace features {
+namespace ash::assistant::features {
const base::Feature kAssistantAudioEraser{"AssistantAudioEraser",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -99,6 +97,4 @@
return base::FeatureList::IsEnabled(kEnableLibAssistantV2);
}
-} // namespace features
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::features
diff --git a/chromeos/ash/services/assistant/public/cpp/features.h b/chromeos/ash/services/assistant/public/cpp/features.h
index 07de12fa..a170bbc3 100644
--- a/chromeos/ash/services/assistant/public/cpp/features.h
+++ b/chromeos/ash/services/assistant/public/cpp/features.h
@@ -9,9 +9,7 @@
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
-namespace chromeos {
-namespace assistant {
-namespace features {
+namespace ash::assistant::features {
// Enable Assistant Feedback UI.
COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC)
@@ -83,8 +81,11 @@
COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC) bool IsLibAssistantV2Enabled();
-} // namespace features
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::features
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+namespace features = ::ash::assistant::features;
+}
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_FEATURES_H_
diff --git a/chromeos/ash/services/assistant/public/cpp/switches.cc b/chromeos/ash/services/assistant/public/cpp/switches.cc
index 4fd2d11..8285341e 100644
--- a/chromeos/ash/services/assistant/public/cpp/switches.cc
+++ b/chromeos/ash/services/assistant/public/cpp/switches.cc
@@ -4,14 +4,10 @@
#include "chromeos/ash/services/assistant/public/cpp/switches.h"
-namespace chromeos {
-namespace assistant {
-namespace switches {
+namespace ash::assistant::switches {
const char kForceAssistantOnboarding[] = "force-assistant-onboarding";
const char kRedirectLibassistantLogging[] = "redirect-libassistant-logging";
const char kDisableLibAssistantLogfile[] = "disable-libassistant-logfile";
-} // namespace switches
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::switches
diff --git a/chromeos/ash/services/assistant/public/cpp/switches.h b/chromeos/ash/services/assistant/public/cpp/switches.h
index 3cae5fe88..f3ea9fa 100644
--- a/chromeos/ash/services/assistant/public/cpp/switches.h
+++ b/chromeos/ash/services/assistant/public/cpp/switches.h
@@ -7,9 +7,7 @@
#include "base/component_export.h"
-namespace chromeos {
-namespace assistant {
-namespace switches {
+namespace ash::assistant::switches {
// NOTE: Switches are reserved for developer-facing options. End-user facing
// features should use base::Feature. See features.h.
@@ -29,8 +27,11 @@
COMPONENT_EXPORT(ASSISTANT_SERVICE_PUBLIC)
extern const char kDisableLibAssistantLogfile[];
-} // namespace switches
-} // namespace assistant
-} // namespace chromeos
+} // namespace ash::assistant::switches
+
+// TODO(https://crbug.com/1164001): remove when the migration is finished.
+namespace chromeos::assistant {
+namespace switches = ::ash::assistant::switches;
+}
#endif // CHROMEOS_ASH_SERVICES_ASSISTANT_PUBLIC_CPP_SWITCHES_H_
diff --git a/chromeos/ash/services/assistant/service_context.h b/chromeos/ash/services/assistant/service_context.h
index 31dba51..1717db5 100644
--- a/chromeos/ash/services/assistant/service_context.h
+++ b/chromeos/ash/services/assistant/service_context.h
@@ -12,6 +12,8 @@
// ash/.
#include "ash/components/audio/cras_audio_handler.h"
#include "base/memory/scoped_refptr.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
+#include "chromeos/ash/services/assistant/public/cpp/device_actions.h"
namespace ash {
class AssistantAlarmTimerController;
@@ -31,8 +33,6 @@
namespace chromeos {
namespace assistant {
-class DeviceActions;
-
// Context object passed around so classes can access some of the |Service|
// functionality without directly depending on the |Service| class.
class ServiceContext {
diff --git a/chromeos/services/libassistant/public/cpp/android_app_info.h b/chromeos/services/libassistant/public/cpp/android_app_info.h
index a8bda075..832979e 100644
--- a/chromeos/services/libassistant/public/cpp/android_app_info.h
+++ b/chromeos/services/libassistant/public/cpp/android_app_info.h
@@ -52,4 +52,10 @@
} // namespace assistant
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when it moved to ash.
+namespace ash::assistant {
+using ::chromeos::assistant::AndroidAppInfo;
+using ::chromeos::assistant::AppStatus;
+} // namespace ash::assistant
+
#endif // CHROMEOS_SERVICES_LIBASSISTANT_PUBLIC_CPP_ANDROID_APP_INFO_H_
diff --git a/chromeos/services/libassistant/public/cpp/assistant_feedback.h b/chromeos/services/libassistant/public/cpp/assistant_feedback.h
index 9e4dce9..de55a7d 100644
--- a/chromeos/services/libassistant/public/cpp/assistant_feedback.h
+++ b/chromeos/services/libassistant/public/cpp/assistant_feedback.h
@@ -33,4 +33,9 @@
} // namespace assistant
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when it moved to ash.
+namespace ash::assistant {
+using ::chromeos::assistant::AssistantFeedback;
+}
+
#endif // CHROMEOS_SERVICES_LIBASSISTANT_PUBLIC_CPP_ASSISTANT_FEEDBACK_H_
diff --git a/chromeos/services/libassistant/public/cpp/assistant_interaction_metadata.h b/chromeos/services/libassistant/public/cpp/assistant_interaction_metadata.h
index 23719b3..fadb32ae 100644
--- a/chromeos/services/libassistant/public/cpp/assistant_interaction_metadata.h
+++ b/chromeos/services/libassistant/public/cpp/assistant_interaction_metadata.h
@@ -62,4 +62,9 @@
} // namespace assistant
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when it moved to ash.
+namespace ash::assistant {
+using ::chromeos::assistant::AssistantQuerySource;
+}
+
#endif // CHROMEOS_SERVICES_LIBASSISTANT_PUBLIC_CPP_ASSISTANT_INTERACTION_METADATA_H_
diff --git a/chromeos/services/libassistant/public/cpp/assistant_notification.h b/chromeos/services/libassistant/public/cpp/assistant_notification.h
index 188c2da..53a92d5 100644
--- a/chromeos/services/libassistant/public/cpp/assistant_notification.h
+++ b/chromeos/services/libassistant/public/cpp/assistant_notification.h
@@ -104,4 +104,9 @@
} // namespace assistant
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when it moved to ash.
+namespace ash::assistant {
+using ::chromeos::assistant::AssistantNotification;
+}
+
#endif // CHROMEOS_SERVICES_LIBASSISTANT_PUBLIC_CPP_ASSISTANT_NOTIFICATION_H_
diff --git a/chromeos/services/libassistant/public/cpp/assistant_suggestion.h b/chromeos/services/libassistant/public/cpp/assistant_suggestion.h
index 47a0ea28..0a59b63f 100644
--- a/chromeos/services/libassistant/public/cpp/assistant_suggestion.h
+++ b/chromeos/services/libassistant/public/cpp/assistant_suggestion.h
@@ -73,4 +73,9 @@
} // namespace assistant
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when it moved to ash.
+namespace ash::assistant {
+using ::chromeos::assistant::AssistantSuggestion;
+}
+
#endif // CHROMEOS_SERVICES_LIBASSISTANT_PUBLIC_CPP_ASSISTANT_SUGGESTION_H_
diff --git a/docs/login/first_user_run_oobe.md b/docs/login/first_user_run_oobe.md
index 9a41f051..3517613 100644
--- a/docs/login/first_user_run_oobe.md
+++ b/docs/login/first_user_run_oobe.md
@@ -94,7 +94,7 @@
The final step of the opt-in flow is informing the user the Assistant is ready,
and offering to enable some advanced features, if any are available.
-Much of this flow is managed by chromeos::assistant::AssistantSettings service.
+Much of this flow is managed by ash::assistant::AssistantSettings service.
To effectively test the screen flow, this service should be faked by the test.
# Multi-device Setup screen