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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 345743002: Translate: Hide the bubble if the user denies translating 2 times within 24 hours (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | components/translate/core/browser/translate_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index a467ff2a85e006b5a8fc1f7d577bcbc83dd47bf5..9b18de83886558feedc59629dff401aca5d2f76b 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1166,6 +1166,15 @@ void BrowserView::ShowTranslateBubble(content::WebContents* web_contents,
content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
if (rvh->IsFocusedElementEditable())
return;
+
+ if (IsOffTheRecord())
sky 2014/06/19 15:46:46 This code is not platform specific. Can it be move
hajimehoshi 2014/06/20 11:38:45 Done. Moved to ChromeTranslateClient. BrowserComm
+ return;
+
+ PrefService* pref = browser_->profile()->GetOriginalProfile()->GetPrefs();
+ scoped_ptr<TranslatePrefs> translate_prefs =
+ ChromeTranslateClient::CreateTranslatePrefs(pref);
+ if (translate_prefs->IsBubbleHidden())
+ return;
}
ChromeTranslateClient* chrome_translate_client =
« no previous file with comments | « no previous file | components/translate/core/browser/translate_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698