Index: chrome/browser/translate/cld_data_harness_factory.h |
diff --git a/chrome/browser/translate/cld_data_harness_factory.h b/chrome/browser/translate/cld_data_harness_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3bcc15211a428746fc788943652bbbda29c3e0f2 |
--- /dev/null |
+++ b/chrome/browser/translate/cld_data_harness_factory.h |
@@ -0,0 +1,48 @@ |
+// 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. |
+ |
+#ifndef CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_FACTORY_H_ |
+#define CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_FACTORY_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/translate/cld_data_harness.h" |
+ |
+namespace test { |
+ |
+class CldDataHarnessFactory { |
+ public: |
+ CldDataHarnessFactory(); |
+ virtual ~CldDataHarnessFactory(); |
+ |
+ // Create a new CldDataHarness. |
+ // The default implementation returns a simple CldDataHarness, which is |
+ // likely to be incorrect for most non-static CLD use cases. |
+ virtual scoped_ptr<CldDataHarness> CreateCldDataHarness(); |
+ |
+ // Sets the CldDataHarnessFactory instance for the process. |
+ static void Set(CldDataHarnessFactory* instance); |
+ |
+ // Returns the CldDataHarnessFactory instance previously set for the process. |
+ static CldDataHarnessFactory* Get(); |
+ |
+ // Fetch the global instance of the "none" factory that produces a harness |
+ // suitable for use with the "none" CLD data source. |
+ static CldDataHarnessFactory* NONE(); |
+ |
+ // Fetch the global instance of the "static" factory that produces a harness |
+ // suitable for use with the "static" CLD data source. |
+ static CldDataHarnessFactory* STATIC(); |
+ |
+ // Fetch the global instance of the "standalone" factory that produces a |
+ // harness suitable for use with the "standalone" CLD data source. |
+ static CldDataHarnessFactory* STANDALONE(); |
+ |
+ // Fetch the global instance of the "component" factory that produces a |
+ // harness suitable for use with the "component" CLD data source. |
+ static CldDataHarnessFactory* COMPONENT(); |
+}; |
+} // namespace test |
+ |
+#endif // CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_FACTORY_H_ |