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(
const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) {
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());
return;
}
......@@ -263,7 +263,7 @@ void AmbientBackendControllerImpl::OnScreenUpdateInfoFetched(
DCHECK(backdrop_url_loader);
// 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.
backdrop::ScreenUpdate backdrop_screen_update =
BackdropClientConfig::ParseScreenUpdateFromResponse(*response);
......@@ -355,7 +355,7 @@ void AmbientBackendControllerImpl::FetchSettingPreviewInternal(
const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) {
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=*/{});
return;
}
......@@ -398,7 +398,7 @@ void AmbientBackendControllerImpl::FetchPersonalAlbumsInternal(
const std::string& access_token) {
if (gaia_id.empty() || access_token.empty()) {
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());
return;
}
......@@ -426,7 +426,7 @@ void AmbientBackendControllerImpl::OnPersonalAlbumsFetched(
DCHECK(backdrop_url_loader);
// 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.
ash::PersonalAlbums personal_albums =
BackdropClientConfig::ParsePersonalAlbumsResponse(*response);
......
......@@ -11,7 +11,7 @@
namespace ash {
// A dummy implementation of AmbientBackendController.
// A fake implementation of AmbientBackendController.
class ASH_EXPORT FakeAmbientBackendControllerImpl
: public AmbientBackendController {
public:
......
......@@ -67,7 +67,7 @@ struct ASH_PUBLIC_EXPORT ScreenUpdate {
// Fahrenheit. Will be a null-opt if:
// 1. The weather setting was disabled in the request, or
// 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.
base::Optional<WeatherInfo> weather_info;
};
......@@ -96,7 +96,7 @@ class ASH_PUBLIC_EXPORT AmbientBackendController {
// server.
// Upon completion, |callback| is run with the parsed |ScreenUpdate|. If any
// 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(
int num_topics,
OnScreenUpdateInfoFetchedCallback callback) = 0;
......
......@@ -41,8 +41,8 @@ class QuickAnswersViewsTest : public AshTestBase {
void SetUp() override {
AshTestBase::SetUp();
dummy_anchor_bounds_ = kDefaultAnchorBoundsInScreen;
CreateQuickAnswersView(dummy_anchor_bounds_, "dummy_title",
anchor_bounds_ = kDefaultAnchorBoundsInScreen;
CreateQuickAnswersView(anchor_bounds_, "default_title",
/*create_menu=*/false);
}
......@@ -62,7 +62,7 @@ class QuickAnswersViewsTest : public AshTestBase {
QuickAnswersView* view() { return quick_answers_view_.get(); }
// 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
// title-text.
......@@ -76,12 +76,12 @@ class QuickAnswersViewsTest : public AshTestBase {
if (create_menu)
CreateAndShowBasicMenu();
dummy_anchor_bounds_ = anchor_bounds;
anchor_bounds_ = anchor_bounds;
auto* ui_controller =
static_cast<QuickAnswersControllerImpl*>(QuickAnswersController::Get())
->quick_answers_ui_controller();
quick_answers_view_ = std::make_unique<QuickAnswersView>(
dummy_anchor_bounds_, title, ui_controller);
anchor_bounds_, title, ui_controller);
}
void CreateAndShowBasicMenu() {
......@@ -98,7 +98,7 @@ class QuickAnswersViewsTest : public AshTestBase {
private:
std::unique_ptr<QuickAnswersView> quick_answers_view_;
gfx::Rect dummy_anchor_bounds_;
gfx::Rect anchor_bounds_;
base::test::ScopedFeatureList scoped_feature_list_;
// Menu.
......@@ -110,7 +110,7 @@ class QuickAnswersViewsTest : public AshTestBase {
TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) {
gfx::Rect view_bounds = view()->GetBoundsInScreen();
gfx::Rect anchor_bounds = dummy_anchor_bounds();
gfx::Rect anchor_bounds = GetAnchorBounds();
// Vertically aligned with anchor.
EXPECT_EQ(view_bounds.x(), anchor_bounds.x());
......@@ -121,12 +121,12 @@ TEST_F(QuickAnswersViewsTest, DefaultLayoutAroundAnchor) {
}
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
// space above it to show the QuickAnswersView.
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();
// Anchor is positioned above the view.
......@@ -143,7 +143,7 @@ TEST_F(QuickAnswersViewsTest, FocusProperties) {
EXPECT_FALSE(view()->HasFocus());
// Set up a companion menu before creating a new view.
CreateQuickAnswersView(dummy_anchor_bounds(), "dummy_title",
CreateQuickAnswersView(GetAnchorBounds(), "title",
/*create_menu=*/true);
CHECK(views::MenuController::GetActiveInstance() &&
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