Commit f277b5f6 authored by Jeroen Dhollander's avatar Jeroen Dhollander Committed by Commit Bot

Words matter. Replace offensive words.

See go/inclusive-codebase.

The following words were replaced (if found):
    - blacklist
    - whitelist
    - dummy
    - sanity-check
    - he/she/her/him/her
    - slave
    - master (Note: still used as branch name for
            chromeos/assistant/internal, which I'll
            look at in another commit).
    - first-class
    - sane/crazy/insane/cripple
    - greylist/darklist/lightlist
    - grandfathered
    - (black|white|gray|grey) hat
    - redline
    - man-in-the-middle
    - white glove
    - white label

The following directories were searched:
    - ash/ambient
    - ash/app_list/views/assistant
    - ash/assistant
    - ash/public/cpp/ambient
    - ash/quick_answers/ui
    - chrome/browser/chromeos/assistant
    - chrome/browser/ui/ash/ambient
    - chrome/browser/ui/ash/assistant
    - chromeos/assistant
    - chromeos/assistant/internal
    - chromeos/components/quick_answers
    - chromeos/services/assistant

This list of directories was collected here:
https://docs.google.com/spreadsheets/d/13RlCX_ezze2RwL3rAcgnS0LhGwvIHtw69UvTGyFDdf4/preview?ts=5f2862bf#gid=88888402

Bug: b/161801556
Change-Id: Ic4029c1826838b7cb92d4ca092dca55d34487bbb
Tests: compiled
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2335502
Commit-Queue: Jeroen Dhollander <jeroendh@chromium.org>
Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794329}
parent f80cb88a
...@@ -236,7 +236,7 @@ void AmbientBackendControllerImpl::FetchScreenUpdateInfoInternal( ...@@ -236,7 +236,7 @@ void AmbientBackendControllerImpl::FetchScreenUpdateInfoInternal(
const std::string& access_token) { const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) { if (gaia_id.empty() || access_token.empty()) {
LOG(ERROR) << "Failed to fetch access token"; LOG(ERROR) << "Failed to fetch access token";
// Returns a dummy instance to indicate the failure. // Returns an empty instance to indicate the failure.
std::move(callback).Run(ash::ScreenUpdate()); std::move(callback).Run(ash::ScreenUpdate());
return; return;
} }
...@@ -263,7 +263,7 @@ void AmbientBackendControllerImpl::OnScreenUpdateInfoFetched( ...@@ -263,7 +263,7 @@ void AmbientBackendControllerImpl::OnScreenUpdateInfoFetched(
DCHECK(backdrop_url_loader); DCHECK(backdrop_url_loader);
// Parse the |ScreenUpdate| out from the response string. // Parse the |ScreenUpdate| out from the response string.
// Note that the |backdrop_screen_update| can be a dummy instance if the // Note that the |backdrop_screen_update| can be an empty instance if the
// parsing has failed. // parsing has failed.
backdrop::ScreenUpdate backdrop_screen_update = backdrop::ScreenUpdate backdrop_screen_update =
BackdropClientConfig::ParseScreenUpdateFromResponse(*response); BackdropClientConfig::ParseScreenUpdateFromResponse(*response);
...@@ -355,7 +355,7 @@ void AmbientBackendControllerImpl::FetchSettingPreviewInternal( ...@@ -355,7 +355,7 @@ void AmbientBackendControllerImpl::FetchSettingPreviewInternal(
const std::string& access_token) { const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) { if (gaia_id.empty() || access_token.empty()) {
LOG(ERROR) << "Failed to fetch access token"; LOG(ERROR) << "Failed to fetch access token";
// Returns a dummy instance to indicate the failure. // Returns an empty instance to indicate the failure.
std::move(callback).Run(/*preview_urls=*/{}); std::move(callback).Run(/*preview_urls=*/{});
return; return;
} }
...@@ -398,7 +398,7 @@ void AmbientBackendControllerImpl::FetchPersonalAlbumsInternal( ...@@ -398,7 +398,7 @@ void AmbientBackendControllerImpl::FetchPersonalAlbumsInternal(
const std::string& access_token) { const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) { if (gaia_id.empty() || access_token.empty()) {
LOG(ERROR) << "Failed to fetch access token"; LOG(ERROR) << "Failed to fetch access token";
// Returns a dummy instance to indicate the failure. // Returns an empty instance to indicate the failure.
std::move(callback).Run(ash::PersonalAlbums()); std::move(callback).Run(ash::PersonalAlbums());
return; return;
} }
...@@ -426,7 +426,7 @@ void AmbientBackendControllerImpl::OnPersonalAlbumsFetched( ...@@ -426,7 +426,7 @@ void AmbientBackendControllerImpl::OnPersonalAlbumsFetched(
DCHECK(backdrop_url_loader); DCHECK(backdrop_url_loader);
// Parse the |PersonalAlbumsResponse| out from the response string. // Parse the |PersonalAlbumsResponse| out from the response string.
// Note that the |personal_albums| can be a dummy instance if the parsing has // Note that the |personal_albums| can be an empty instance if the parsing has
// failed. // failed.
ash::PersonalAlbums personal_albums = ash::PersonalAlbums personal_albums =
BackdropClientConfig::ParsePersonalAlbumsResponse(*response); BackdropClientConfig::ParsePersonalAlbumsResponse(*response);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
namespace ash { namespace ash {
// A dummy implementation of AmbientBackendController. // A fake implementation of AmbientBackendController.
class ASH_EXPORT FakeAmbientBackendControllerImpl class ASH_EXPORT FakeAmbientBackendControllerImpl
: public AmbientBackendController { : public AmbientBackendController {
public: public:
......
...@@ -67,7 +67,7 @@ struct ASH_PUBLIC_EXPORT ScreenUpdate { ...@@ -67,7 +67,7 @@ struct ASH_PUBLIC_EXPORT ScreenUpdate {
// Fahrenheit. Will be a null-opt if: // Fahrenheit. Will be a null-opt if:
// 1. The weather setting was disabled in the request, or // 1. The weather setting was disabled in the request, or
// 2. Fatal errors, such as response parsing failure, happened during the // 2. Fatal errors, such as response parsing failure, happened during the
// process, and a dummy |ScreenUpdate| instance was returned to indicate // process, and a default |ScreenUpdate| instance was returned to indicate
// the error. // the error.
base::Optional<WeatherInfo> weather_info; base::Optional<WeatherInfo> weather_info;
}; };
...@@ -96,7 +96,7 @@ class ASH_PUBLIC_EXPORT AmbientBackendController { ...@@ -96,7 +96,7 @@ class ASH_PUBLIC_EXPORT AmbientBackendController {
// server. // server.
// Upon completion, |callback| is run with the parsed |ScreenUpdate|. If any // Upon completion, |callback| is run with the parsed |ScreenUpdate|. If any
// errors happened during the process, e.g. failed to fetch access token, a // errors happened during the process, e.g. failed to fetch access token, a
// dummy instance will be returned. // default instance will be returned.
virtual void FetchScreenUpdateInfo( virtual void FetchScreenUpdateInfo(
int num_topics, int num_topics,
OnScreenUpdateInfoFetchedCallback callback) = 0; OnScreenUpdateInfoFetchedCallback callback) = 0;
......
...@@ -41,8 +41,8 @@ class QuickAnswersViewsTest : public AshTestBase { ...@@ -41,8 +41,8 @@ class QuickAnswersViewsTest : public AshTestBase {
void SetUp() override { void SetUp() override {
AshTestBase::SetUp(); AshTestBase::SetUp();
dummy_anchor_bounds_ = kDefaultAnchorBoundsInScreen; anchor_bounds_ = kDefaultAnchorBoundsInScreen;
CreateQuickAnswersView(dummy_anchor_bounds_, "dummy_title", CreateQuickAnswersView(anchor_bounds_, "default_title",
/*create_menu=*/false); /*create_menu=*/false);
} }
...@@ -62,7 +62,7 @@ class QuickAnswersViewsTest : public AshTestBase { ...@@ -62,7 +62,7 @@ class QuickAnswersViewsTest : public AshTestBase {
QuickAnswersView* view() { return quick_answers_view_.get(); } QuickAnswersView* view() { return quick_answers_view_.get(); }
// Needed to poll the current bounds of the mock anchor. // Needed to poll the current bounds of the mock anchor.
const gfx::Rect& dummy_anchor_bounds() { return dummy_anchor_bounds_; } const gfx::Rect& GetAnchorBounds() { return anchor_bounds_; }
// Create a QuickAnswersView instance with custom anchor-bounds and // Create a QuickAnswersView instance with custom anchor-bounds and
// title-text. // title-text.
...@@ -76,12 +76,12 @@ class QuickAnswersViewsTest : public AshTestBase { ...@@ -76,12 +76,12 @@ class QuickAnswersViewsTest : public AshTestBase {
if (create_menu) if (create_menu)
CreateAndShowBasicMenu(); CreateAndShowBasicMenu();
dummy_anchor_bounds_ = anchor_bounds; anchor_bounds_ = anchor_bounds;
auto* ui_controller = auto* ui_controller =
static_cast<QuickAnswersControllerImpl*>(QuickAnswersController::Get()) static_cast<QuickAnswersControllerImpl*>(QuickAnswersController::Get())
->quick_answers_ui_controller(); ->quick_answers_ui_controller();
quick_answers_view_ = std::make_unique<QuickAnswersView>( quick_answers_view_ = std::make_unique<QuickAnswersView>(
dummy_anchor_bounds_, title, ui_controller); anchor_bounds_, title, ui_controller);
} }
void CreateAndShowBasicMenu() { void CreateAndShowBasicMenu() {
...@@ -98,7 +98,7 @@ class QuickAnswersViewsTest : public AshTestBase { ...@@ -98,7 +98,7 @@ class QuickAnswersViewsTest : public AshTestBase {
private: private:
std::unique_ptr<QuickAnswersView> quick_answers_view_; std::unique_ptr<QuickAnswersView> quick_answers_view_;
gfx::Rect dummy_anchor_bounds_; gfx::Rect anchor_bounds_;
base::test::ScopedFeatureList scoped_feature_list_; base::test::ScopedFeatureList scoped_feature_list_;
// Menu. // Menu.
...@@ -110,7 +110,7 @@ class QuickAnswersViewsTest : public AshTestBase { ...@@ -110,7 +110,7 @@ class QuickAnswersViewsTest : public AshTestBase {
TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) { TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) {
gfx::Rect view_bounds = view()->GetBoundsInScreen(); gfx::Rect view_bounds = view()->GetBoundsInScreen();
gfx::Rect anchor_bounds = dummy_anchor_bounds(); gfx::Rect anchor_bounds = GetAnchorBounds();
// Vertically aligned with anchor. // Vertically aligned with anchor.
EXPECT_EQ(view_bounds.x(), anchor_bounds.x()); EXPECT_EQ(view_bounds.x(), anchor_bounds.x());
...@@ -121,12 +121,12 @@ TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) { ...@@ -121,12 +121,12 @@ TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) {
} }
TEST_F(QuickAnswersViewsTest, PositionedBelowAnchorIfLessSpaceAbove) { TEST_F(QuickAnswersViewsTest, PositionedBelowAnchorIfLessSpaceAbove) {
gfx::Rect anchor_bounds = dummy_anchor_bounds(); gfx::Rect anchor_bounds = GetAnchorBounds();
// Update anchor-bounds' position so that it does not leave enough vertical // Update anchor-bounds' position so that it does not leave enough vertical
// space above it to show the QuickAnswersView. // space above it to show the QuickAnswersView.
anchor_bounds.set_y(kSmallTop); anchor_bounds.set_y(kSmallTop);
CreateQuickAnswersView(anchor_bounds, "dummy_title", /*create_menu=*/false); CreateQuickAnswersView(anchor_bounds, "title", /*create_menu=*/false);
gfx::Rect view_bounds = view()->GetBoundsInScreen(); gfx::Rect view_bounds = view()->GetBoundsInScreen();
// Anchor is positioned above the view. // Anchor is positioned above the view.
...@@ -143,7 +143,7 @@ TEST_F(QuickAnswersViewsTest, FocusProperties) { ...@@ -143,7 +143,7 @@ TEST_F(QuickAnswersViewsTest, FocusProperties) {
EXPECT_FALSE(view()->HasFocus()); EXPECT_FALSE(view()->HasFocus());
// Set up a companion menu before creating a new view. // Set up a companion menu before creating a new view.
CreateQuickAnswersView(dummy_anchor_bounds(), "dummy_title", CreateQuickAnswersView(GetAnchorBounds(), "title",
/*create_menu=*/true); /*create_menu=*/true);
CHECK(views::MenuController::GetActiveInstance() && CHECK(views::MenuController::GetActiveInstance() &&
views::MenuController::GetActiveInstance()->owner()); views::MenuController::GetActiveInstance()->owner());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment