OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_RENDERER_CLD_UTILS_H_ |
| 6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_RENDERER_CLD_UTILS_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 namespace translate { |
| 11 |
| 12 // Renderer-side utilities for dealing with CLD data source configuration. |
| 13 // This class exists primarily to avoid duplicating code in high-level targets |
| 14 // such as the Chrome browser, Chrome shell, and so on. |
| 15 class RendererCldUtils { |
| 16 public: |
| 17 // Perform conditional configuration of the CLD data provider. |
| 18 // If no specific RendererCldDataProvider has yet been set, an instance is |
| 19 // created and assigned as appropriate for each platform. If a specific |
| 20 // RendererCldDataProviderFactory *has* been set, this method does nothing |
| 21 // (as a side effect of setting the default factory, subsequent invocations |
| 22 // do nothing - making this method reentrant). |
| 23 // |
| 24 // This method will not overwrite a data provider configured by an embedder. |
| 25 // |
| 26 // Maintainers: This is the default data source. It is appropriate to |
| 27 // ifdef this code and customize the default per-platform. This method must |
| 28 // be invoked prior to registering components with the component updater if |
| 29 // the component updater implementation is to be used; it is best to ensure |
| 30 // that this method is called as early as possible. |
| 31 static void ConfigureDefaultDataProvider(); |
| 32 |
| 33 private: |
| 34 RendererCldUtils() {} |
| 35 ~RendererCldUtils() {} |
| 36 DISALLOW_COPY_AND_ASSIGN(RendererCldUtils); |
| 37 }; |
| 38 |
| 39 } // namespace translate |
| 40 |
| 41 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_RENDERER_CLD_UTILS_H_ |
OLD | NEW |