Commit 5f9860d6 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:
  - blacklist
  - whitelist
  - dummy
  - sanity-check
  - he/she/her/him/her

The following words were searched for but not found:
  - 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

     Tests: compiled

Bug: b/161801556
Change-Id: I37d96697e38ee171f6df7171061a9ecc075eeca1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310846Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Jeroen Dhollander <jeroendh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790852}
parent 86d988bf
...@@ -39,7 +39,7 @@ class MockedAssistantInteraction { ...@@ -39,7 +39,7 @@ class MockedAssistantInteraction {
TestAssistantService* service_; TestAssistantService* service_;
std::unique_ptr<InteractionResponse> response_; std::unique_ptr<InteractionResponse> response_;
std::string query_ = "<dummy-query>"; std::string query_ = "<fake-query>";
Resolution resolution_ = Resolution::kNormal; Resolution resolution_ = Resolution::kNormal;
}; };
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace ash { namespace ash {
// Dummy implementation of the Assistant client. // Fake implementation of the Assistant client.
class TestAssistantClient : public AssistantClient { class TestAssistantClient : public AssistantClient {
public: public:
TestAssistantClient(); TestAssistantClient();
......
...@@ -25,10 +25,10 @@ using chromeos::assistant::AssistantSuggestion; ...@@ -25,10 +25,10 @@ using chromeos::assistant::AssistantSuggestion;
// - A conversation is finished before starting a new one. // - A conversation is finished before starting a new one.
// - No responses (text, card, ...) are sent before starting or after // - No responses (text, card, ...) are sent before starting or after
// finishing an interaction. // finishing an interaction.
class SanityCheckSubscriber : public AssistantInteractionSubscriber { class LibassistantContractChecker : public AssistantInteractionSubscriber {
public: public:
SanityCheckSubscriber() = default; LibassistantContractChecker() = default;
~SanityCheckSubscriber() override = default; ~LibassistantContractChecker() override = default;
// DefaultAssistantInteractionSubscriber implementation: // DefaultAssistantInteractionSubscriber implementation:
void OnInteractionStarted( void OnInteractionStarted(
...@@ -89,7 +89,7 @@ class SanityCheckSubscriber : public AssistantInteractionSubscriber { ...@@ -89,7 +89,7 @@ class SanityCheckSubscriber : public AssistantInteractionSubscriber {
ConversationState current_state_ = ConversationState::kNotStarted; ConversationState current_state_ = ConversationState::kNotStarted;
DISALLOW_COPY_AND_ASSIGN(SanityCheckSubscriber); DISALLOW_COPY_AND_ASSIGN(LibassistantContractChecker);
}; };
// Subscriber that tracks the current interaction. // Subscriber that tracks the current interaction.
...@@ -187,10 +187,11 @@ class ResolutionResponse : public InteractionResponse::Response { ...@@ -187,10 +187,11 @@ class ResolutionResponse : public InteractionResponse::Response {
}; };
TestAssistantService::TestAssistantService() TestAssistantService::TestAssistantService()
: sanity_check_subscriber_(std::make_unique<SanityCheckSubscriber>()), : libassistant_contract_checker_(
std::make_unique<LibassistantContractChecker>()),
current_interaction_subscriber_( current_interaction_subscriber_(
std::make_unique<CurrentInteractionSubscriber>()) { std::make_unique<CurrentInteractionSubscriber>()) {
AddAssistantInteractionSubscriber(sanity_check_subscriber_.get()); AddAssistantInteractionSubscriber(libassistant_contract_checker_.get());
AddAssistantInteractionSubscriber(current_interaction_subscriber_.get()); AddAssistantInteractionSubscriber(current_interaction_subscriber_.get());
} }
...@@ -270,8 +271,7 @@ void TestAssistantService::NotifyEntryIntoAssistantUi( ...@@ -270,8 +271,7 @@ void TestAssistantService::NotifyEntryIntoAssistantUi(
chromeos::assistant::AssistantEntryPoint entry_point) {} chromeos::assistant::AssistantEntryPoint entry_point) {}
void TestAssistantService::AddTimeToTimer(const std::string& id, void TestAssistantService::AddTimeToTimer(const std::string& id,
base::TimeDelta duration) { base::TimeDelta duration) {}
}
void TestAssistantService::PauseTimer(const std::string& id) {} void TestAssistantService::PauseTimer(const std::string& id) {}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace ash { namespace ash {
class CurrentInteractionSubscriber; class CurrentInteractionSubscriber;
class SanityCheckSubscriber; class LibassistantContractChecker;
// A response issued when an Assistant interaction is started. // A response issued when an Assistant interaction is started.
// Used both for text and voice interactions. To build a response, simply // Used both for text and voice interactions. To build a response, simply
...@@ -55,7 +55,7 @@ class InteractionResponse { ...@@ -55,7 +55,7 @@ class InteractionResponse {
DISALLOW_COPY_AND_ASSIGN(InteractionResponse); DISALLOW_COPY_AND_ASSIGN(InteractionResponse);
}; };
// Dummy implementation of the Assistant service. // Fake implementation of the Assistant service.
// It behaves as if the Assistant service is up-and-running, // It behaves as if the Assistant service is up-and-running,
// and will inform the |AssistantInteractionSubscriber| instances when // and will inform the |AssistantInteractionSubscriber| instances when
// interactions start/stop. // interactions start/stop.
...@@ -117,7 +117,7 @@ class TestAssistantService : public chromeos::assistant::Assistant { ...@@ -117,7 +117,7 @@ class TestAssistantService : public chromeos::assistant::Assistant {
const std::string& query = std::string()); const std::string& query = std::string());
void SendInteractionResponse(); void SendInteractionResponse();
std::unique_ptr<SanityCheckSubscriber> sanity_check_subscriber_; std::unique_ptr<LibassistantContractChecker> libassistant_contract_checker_;
std::unique_ptr<CurrentInteractionSubscriber> current_interaction_subscriber_; std::unique_ptr<CurrentInteractionSubscriber> current_interaction_subscriber_;
std::unique_ptr<InteractionResponse> interaction_response_; std::unique_ptr<InteractionResponse> interaction_response_;
......
...@@ -31,47 +31,46 @@ namespace chromeos { ...@@ -31,47 +31,46 @@ namespace chromeos {
namespace assistant { namespace assistant {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// DummyAuthProvider // FakeAuthProvider
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
std::string PlatformApiImpl::DummyAuthProvider::GetAuthClientId() { std::string PlatformApiImpl::FakeAuthProvider::GetAuthClientId() {
return "kFakeClientId"; return "kFakeClientId";
} }
std::vector<std::string> std::vector<std::string>
PlatformApiImpl::DummyAuthProvider::GetClientCertificateChain() { PlatformApiImpl::FakeAuthProvider::GetClientCertificateChain() {
return {}; return {};
} }
void PlatformApiImpl::DummyAuthProvider::CreateCredentialAttestationJwt( void PlatformApiImpl::FakeAuthProvider::CreateCredentialAttestationJwt(
const std::string& authorization_code, const std::string& authorization_code,
const std::vector<std::pair<std::string, std::string>>& claims, const std::vector<std::pair<std::string, std::string>>& claims,
CredentialCallback attestation_callback) { CredentialCallback attestation_callback) {
attestation_callback(Error::SUCCESS, "", ""); attestation_callback(Error::SUCCESS, "", "");
} }
void PlatformApiImpl::DummyAuthProvider::CreateRefreshAssertionJwt( void PlatformApiImpl::FakeAuthProvider::CreateRefreshAssertionJwt(
const std::string& key_identifier, const std::string& key_identifier,
const std::vector<std::pair<std::string, std::string>>& claims, const std::vector<std::pair<std::string, std::string>>& claims,
AssertionCallback assertion_callback) { AssertionCallback assertion_callback) {
assertion_callback(Error::SUCCESS, ""); assertion_callback(Error::SUCCESS, "");
} }
void PlatformApiImpl::DummyAuthProvider::CreateDeviceAttestationJwt( void PlatformApiImpl::FakeAuthProvider::CreateDeviceAttestationJwt(
const std::vector<std::pair<std::string, std::string>>& claims, const std::vector<std::pair<std::string, std::string>>& claims,
AssertionCallback attestation_callback) { AssertionCallback attestation_callback) {
attestation_callback(Error::SUCCESS, ""); attestation_callback(Error::SUCCESS, "");
} }
std::string std::string PlatformApiImpl::FakeAuthProvider::GetAttestationCertFingerprint() {
PlatformApiImpl::DummyAuthProvider::GetAttestationCertFingerprint() {
return "kFakeAttestationCertFingerprint"; return "kFakeAttestationCertFingerprint";
} }
void PlatformApiImpl::DummyAuthProvider::RemoveCredentialKey( void PlatformApiImpl::FakeAuthProvider::RemoveCredentialKey(
const std::string& key_identifier) {} const std::string& key_identifier) {}
void PlatformApiImpl::DummyAuthProvider::Reset() {} void PlatformApiImpl::FakeAuthProvider::Reset() {}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// PlatformApiImpl // PlatformApiImpl
......
...@@ -66,10 +66,10 @@ class PlatformApiImpl : public CrosPlatformApi, ...@@ -66,10 +66,10 @@ class PlatformApiImpl : public CrosPlatformApi,
private: private:
// ChromeOS does not use auth manager, so we don't yet need to implement a // ChromeOS does not use auth manager, so we don't yet need to implement a
// real auth provider. // real auth provider.
class DummyAuthProvider : public assistant_client::AuthProvider { class FakeAuthProvider : public assistant_client::AuthProvider {
public: public:
DummyAuthProvider() = default; FakeAuthProvider() = default;
~DummyAuthProvider() override = default; ~FakeAuthProvider() override = default;
// assistant_client::AuthProvider overrides // assistant_client::AuthProvider overrides
std::string GetAuthClientId() override; std::string GetAuthClientId() override;
...@@ -98,7 +98,7 @@ class PlatformApiImpl : public CrosPlatformApi, ...@@ -98,7 +98,7 @@ class PlatformApiImpl : public CrosPlatformApi,
AudioInputProviderImpl audio_input_provider_; AudioInputProviderImpl audio_input_provider_;
AudioOutputProviderImpl audio_output_provider_; AudioOutputProviderImpl audio_output_provider_;
DummyAuthProvider auth_provider_; FakeAuthProvider auth_provider_;
FileProviderImpl file_provider_; FileProviderImpl file_provider_;
NetworkProviderImpl network_provider_; NetworkProviderImpl network_provider_;
std::unique_ptr<SystemProviderImpl> system_provider_; std::unique_ptr<SystemProviderImpl> system_provider_;
......
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