Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: components/translate/core/browser/translate_infobar_delegate.cc

Issue 2892143002: Remove all feature flag checks in Delegate. (Closed)
Patch Set: fix Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/translate/core/browser/translate_infobar_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_infobar_delegate.cc
diff --git a/components/translate/core/browser/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc
index ae85203d0293284d0b694c2c2f095bc5ffeac273..b00e724212fc9bbedd440552003db78a88439c61 100644
--- a/components/translate/core/browser/translate_infobar_delegate.cc
+++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include <utility>
-#include "base/feature_list.h"
#include "base/i18n/string_compare.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
@@ -125,11 +124,6 @@ void TranslateInfoBarDelegate::Create(
infobar_manager->AddInfoBar(std::move(infobar));
}
-// static
-bool TranslateInfoBarDelegate::IsCompactUIEnabled() {
- return base::FeatureList::IsEnabled(kTranslateCompactUI);
-}
-
void TranslateInfoBarDelegate::SetObserver(Observer* observer) {
observer_ = observer;
}
@@ -150,11 +144,13 @@ void TranslateInfoBarDelegate::Translate() {
void TranslateInfoBarDelegate::RevertTranslation() {
ui_delegate_.RevertTranslation();
- if (IsCompactUIEnabled())
- return;
infobar()->RemoveSelf();
}
+void TranslateInfoBarDelegate::RevertWithoutClosingInfobar() {
+ ui_delegate_.RevertTranslation();
+}
+
void TranslateInfoBarDelegate::ReportLanguageDetectionError() {
if (translate_manager_)
translate_manager_->ReportLanguageDetectionError();
« no previous file with comments | « components/translate/core/browser/translate_infobar_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698