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

Unified Diff: chrome/browser/translate/chrome_translate_client.cc

Issue 1543533002: Restore non-static CLD data functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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
Index: chrome/browser/translate/chrome_translate_client.cc
diff --git a/chrome/browser/translate/chrome_translate_client.cc b/chrome/browser/translate/chrome_translate_client.cc
index 3539ee056d1ca8a3c99248ece93e74714540f5ef..2e2ab8ca1e61b85658d76aa1f9efd9b7ef1cc729 100644
--- a/chrome/browser/translate/chrome_translate_client.cc
+++ b/chrome/browser/translate/chrome_translate_client.cc
@@ -25,7 +25,6 @@
#include "chrome/browser/ui/translate/translate_bubble_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
-#include "components/translate/content/browser/browser_cld_data_provider_factory.h"
#include "components/translate/content/common/cld_data_source.h"
#include "components/translate/content/common/translate_messages.h"
#include "components/translate/core/browser/language_state.h"
@@ -61,14 +60,13 @@ ChromeTranslateClient::ChromeTranslateClient(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
translate_driver_(&web_contents->GetController()),
translate_manager_(
- new translate::TranslateManager(this, prefs::kAcceptLanguages)),
- cld_data_provider_(
- translate::BrowserCldDataProviderFactory::Get()->
- CreateBrowserCldDataProvider(web_contents)) {
+ new translate::TranslateManager(this, prefs::kAcceptLanguages)) {
translate_driver_.AddObserver(this);
translate_driver_.set_translate_manager(translate_manager_.get());
// Customization: for the standalone data source, we configure the path to
// CLD data immediately on startup.
+ // TODO(andrewhayden): This belongs in the data source implementation, not
+ // here.
if (translate::CldDataSource::IsUsingStandaloneDataSource() &&
!g_cld_file_path_initialized_) {
DVLOG(1) << "Initializing CLD file path for the first time.";
@@ -275,10 +273,6 @@ void ChromeTranslateClient::ShowReportLanguageDetectionErrorUI(
#endif // defined(OS_ANDROID)
}
-bool ChromeTranslateClient::OnMessageReceived(const IPC::Message& message) {
- return cld_data_provider_->OnMessageReceived(message);
-}
-
void ChromeTranslateClient::WebContentsDestroyed() {
// Translation process can be interrupted.
// Destroying the TranslateManager now guarantees that it never has to deal
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.h ('k') | components/translate/content/browser/content_translate_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698