Skip to content

Commit

Permalink
Rename overriden methods from TranslateBubbleModel in mock subclass
Browse files Browse the repository at this point in the history
Three virtual methods have been renamed in the superclass, so we need
to update MockTranslateBubbleModel now.

Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/3c90e3b11ba60e218b9f1cf678f4a98cc5443a1b

commit 3c90e3b11ba60e218b9f1cf678f4a98cc5443a1b
Author: Anthony Cui <cuianthony@google.com>
Date:   Mon Mar 1 21:36:46 2021 +0000

    [Translate] Update use of term "original language" to "source language"

    This change focuses on resolving inconsistency in naming in the translate bubble view and infobar. Other areas of the code may still use the "original language" terminology.

    Overview of the scope of this change:
    Renames all usages of term "original language" in
    - TranslateUIDelegate code
    - TranslateBubbleModel code
    - TranslateBubbleView code
    - TranslateInfoBarDelegate code
    - TranslateCompactInfoBar code
    - iOS infobar code that uses the infobar delegate

    Bug: 1179823
  • Loading branch information
mariospr committed May 5, 2021
1 parent 029df69 commit bd1916e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class MockTranslateBubbleModel : public TranslateBubbleModel {
return base::ASCIIToUTF16("Spanish");
}

std::string GetOriginalLanguageCode() const override {
std::string GetSourceLanguageCode() const override {
return std::string("en-US");
}

int GetOriginalLanguageIndex() const override {
int GetSourceLanguageIndex() const override {
return original_language_index_;
}

void UpdateOriginalLanguageIndex(int index) override {
void UpdateSourceLanguageIndex(int index) override {
original_language_index_ = index;
}

Expand Down

0 comments on commit bd1916e

Please sign in to comment.