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

Unified Diff: chrome/browser/ui/translate/translate_bubble_factory.cc

Issue 2400503002: [Translate] Integrate TranslateEventProto UMA logging into TranslateManager. (Closed)
Patch Set: fix trybots Created 4 years, 1 month 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
Index: chrome/browser/ui/translate/translate_bubble_factory.cc
diff --git a/chrome/browser/ui/translate/translate_bubble_factory.cc b/chrome/browser/ui/translate/translate_bubble_factory.cc
index 38465c9cd1a4eb3b64694bc07d5bdbbc9bfcf4dd..7ac2a7451b8a6f1acb02e5ad7ec672c2fbb8a93d 100644
--- a/chrome/browser/ui/translate/translate_bubble_factory.cc
+++ b/chrome/browser/ui/translate/translate_bubble_factory.cc
@@ -9,14 +9,15 @@
namespace {
-void ShowDefault(BrowserWindow* window,
- content::WebContents* web_contents,
- translate::TranslateStep step,
- translate::TranslateErrors::Type error_type) {
+ShowTranslateBubbleResult ShowDefault(
+ BrowserWindow* window,
+ content::WebContents* web_contents,
+ translate::TranslateStep step,
+ translate::TranslateErrors::Type error_type) {
// |window| might be null when testing.
if (!window)
- return;
- window->ShowTranslateBubble(web_contents, step, error_type, false);
+ return ShowTranslateBubbleResult::BROWSER_WINDOW_NOT_VALID;
+ return window->ShowTranslateBubble(web_contents, step, error_type, false);
}
} // namespace
@@ -25,17 +26,17 @@ TranslateBubbleFactory::~TranslateBubbleFactory() {
}
// static
-void TranslateBubbleFactory::Show(BrowserWindow* window,
- content::WebContents* web_contents,
- translate::TranslateStep step,
- translate::TranslateErrors::Type error_type) {
+ShowTranslateBubbleResult TranslateBubbleFactory::Show(
+ BrowserWindow* window,
+ content::WebContents* web_contents,
+ translate::TranslateStep step,
+ translate::TranslateErrors::Type error_type) {
if (current_factory_) {
- current_factory_->ShowImplementation(
- window, web_contents, step, error_type);
- return;
+ return current_factory_->ShowImplementation(window, web_contents, step,
+ error_type);
}
- ShowDefault(window, web_contents, step, error_type);
+ return ShowDefault(window, web_contents, step, error_type);
}
// static

Powered by Google App Engine
This is Rietveld 408576698