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

Side by Side Diff: ios/web_view/internal/translate/web_view_translate_client.mm

Issue 2913593002: Implementation of translation event logging. (Closed)
Patch Set: fix Created 3 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 unified diff | Download patch
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web_view/internal/translate/web_view_translate_client.h" 5 #import "ios/web_view/internal/translate/web_view_translate_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 web_state()->GetBrowserState())); 105 web_state()->GetBrowserState()));
106 DCHECK(accept_languages); 106 DCHECK(accept_languages);
107 return accept_languages; 107 return accept_languages;
108 } 108 }
109 109
110 int WebViewTranslateClient::GetInfobarIconID() const { 110 int WebViewTranslateClient::GetInfobarIconID() const {
111 NOTREACHED(); 111 NOTREACHED();
112 return 0; 112 return 0;
113 } 113 }
114 114
115 void WebViewTranslateClient::RecordTranslateEvent(
116 const metrics::TranslateEventProto&) {
117 // TODO(crbug.com/728491): Implementing gaia-keyed logging.
118 }
119
115 bool WebViewTranslateClient::IsTranslatableURL(const GURL& url) { 120 bool WebViewTranslateClient::IsTranslatableURL(const GURL& url) {
116 return !url.is_empty() && !url.SchemeIs(url::kFtpScheme); 121 return !url.is_empty() && !url.SchemeIs(url::kFtpScheme);
117 } 122 }
118 123
119 void WebViewTranslateClient::ShowReportLanguageDetectionErrorUI( 124 void WebViewTranslateClient::ShowReportLanguageDetectionErrorUI(
120 const GURL& report_url) { 125 const GURL& report_url) {
121 NOTREACHED(); 126 NOTREACHED();
122 } 127 }
123 128
124 void WebViewTranslateClient::WebStateDestroyed() { 129 void WebViewTranslateClient::WebStateDestroyed() {
125 // Translation process can be interrupted. 130 // Translation process can be interrupted.
126 // Destroying the TranslateManager now guarantees that it never has to deal 131 // Destroying the TranslateManager now guarantees that it never has to deal
127 // with nullptr WebState. 132 // with nullptr WebState.
128 translate_manager_.reset(); 133 translate_manager_.reset();
129 } 134 }
130 135
131 } // namespace ios_web_view 136 } // namespace ios_web_view
OLDNEW
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698