summaryrefslogtreecommitdiffstats
path: root/components/translate
diff options
context:
space:
mode:
authorandrewhayden <andrewhayden@chromium.org>2015-01-12 05:23:37 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-12 13:24:31 +0000
commit3198df3341ca97b92da988f72725cca8ea8b8114 (patch)
treefa73692c08cc9d95435c4f2bc420498999cb07fd /components/translate
parent8bc57f64f160d0407641f82f4d21db945a765825 (diff)
downloadchromium_src-3198df3341ca97b92da988f72725cca8ea8b8114.zip
chromium_src-3198df3341ca97b92da988f72725cca8ea8b8114.tar.gz
chromium_src-3198df3341ca97b92da988f72725cca8ea8b8114.tar.bz2
Make DataFileRendererCldDataProvider's LoadCldData method public.
There's no reason that it needs to be private, and if another class wants to compose this with additional functionality, it makes sense for it to be public. BUG=367239 TBR=toyoshim Review URL: https://codereview.chromium.org/845263002 Cr-Commit-Position: refs/heads/master@{#311039}
Diffstat (limited to 'components/translate')
-rw-r--r--components/translate/content/renderer/data_file_renderer_cld_data_provider.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/components/translate/content/renderer/data_file_renderer_cld_data_provider.h b/components/translate/content/renderer/data_file_renderer_cld_data_provider.h
index acd6261..0126696 100644
--- a/components/translate/content/renderer/data_file_renderer_cld_data_provider.h
+++ b/components/translate/content/renderer/data_file_renderer_cld_data_provider.h
@@ -21,6 +21,16 @@ class DataFileRendererCldDataProvider : public RendererCldDataProvider {
explicit DataFileRendererCldDataProvider(content::RenderViewObserver*);
~DataFileRendererCldDataProvider() override;
+ // Load the CLD data from the specified file, starting at the specified byte
+ // offset and having the specified length (also in bytes). Nominally, the
+ // implementation will mmap the file in read-only mode and hand the data off
+ // to CLD2::loadDataFromRawAddress(...). See the module
+ // third_party/cld_2/src/internal/compact_lang_det.h for more information on
+ // the dynamic data loading process.
+ void LoadCldData(base::File file,
+ const uint64 data_offset,
+ const uint64 data_length);
+
// RendererCldDataProvider implementations:
bool OnMessageReceived(const IPC::Message&) override;
void SendCldDataRequest() override;
@@ -31,9 +41,6 @@ class DataFileRendererCldDataProvider : public RendererCldDataProvider {
void OnCldDataAvailable(const IPC::PlatformFileForTransit ipc_file_handle,
const uint64 data_offset,
const uint64 data_length);
- void LoadCldData(base::File file,
- const uint64 data_offset,
- const uint64 data_length);
content::RenderViewObserver* render_view_observer_;
base::Callback<void(void)> cld_available_callback_;