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

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

Issue 2034413003: Delete the non-static CLD data source logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to latest master Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/translate/content/renderer/data_file_renderer_cld_data_provider.h
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
deleted file mode 100644
index 8b644759968778484eec042493b744c703e5d9de..0000000000000000000000000000000000000000
--- a/components/translate/content/renderer/data_file_renderer_cld_data_provider.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// NOT DEAD CODE!
-// This code isn't dead, even if it isn't currently being used. Please refer to:
-// https://www.chromium.org/developers/how-tos/compact-language-detector-cld-data-source-configuration
-
-#ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_DATA_FILE_RENDERER_CLD_DATA_PROVIDER_H_
-#define COMPONENTS_TRANSLATE_CONTENT_RENDERER_DATA_FILE_RENDERER_CLD_DATA_PROVIDER_H_
-
-#include <stdint.h>
-
-#include "base/files/file.h"
-#include "base/macros.h"
-#include "components/translate/content/renderer/renderer_cld_data_provider.h"
-#include "ipc/ipc_platform_file.h"
-
-namespace content {
-class RenderFrameObserver;
-}
-
-namespace translate {
-
-class DataFileRendererCldDataProvider : public RendererCldDataProvider {
- public:
- explicit DataFileRendererCldDataProvider(content::RenderFrameObserver*);
- ~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_t data_offset,
- const uint64_t data_length);
-
- // RendererCldDataProvider implementations:
- bool OnMessageReceived(const IPC::Message&) override;
- void SendCldDataRequest() override;
- void SetCldAvailableCallback(base::Callback<void(void)>) override;
- bool IsCldDataAvailable() override;
-
- private:
- void OnCldDataAvailable(const IPC::PlatformFileForTransit ipc_file_handle,
- const uint64_t data_offset,
- const uint64_t data_length);
- content::RenderFrameObserver* render_frame_observer_;
- base::Callback<void(void)> cld_available_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(DataFileRendererCldDataProvider);
-};
-
-} // namespace translate
-
-#endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_DATA_FILE_RENDERER_CLD_DATA_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698