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

Unified Diff: components/translate/content/renderer/translate_helper.h

Issue 461633002: Refactor language detection logic to allow non-static CLD data sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make some of the harness factory methods private Created 6 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: components/translate/content/renderer/translate_helper.h
diff --git a/components/translate/content/renderer/translate_helper.h b/components/translate/content/renderer/translate_helper.h
index 4d9275d97860625efd0b66e12b0df357d5900536..696217c05a0637bd99467fc77b5b7628d5d07349 100644
--- a/components/translate/content/renderer/translate_helper.h
+++ b/components/translate/content/renderer/translate_helper.h
@@ -244,7 +244,10 @@ class TranslateHelper : public content::RenderViewObserver {
base::TimeTicks language_determined_time_;
// Provides CLD data for this process.
- scoped_ptr<RendererCldDataProvider> cld_data_provider_;
+ // The pointer is owned by the global in RendererCldDataProvider and has the
+ // same lifetime as the process itself, so this field is simply a raw pointer
+ // instead of a scoped_ptr.
+ RendererCldDataProvider* cld_data_provider_;
// Whether or not polling for CLD2 data has started.
bool cld_data_polling_started_;

Powered by Google App Engine
This is Rietveld 408576698