Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / domain_reliability / service.h
index ec7e3b3..9625ae6 100644 (file)
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
-#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
 #include "components/domain_reliability/clear_mode.h"
 #include "components/domain_reliability/domain_reliability_export.h"
 #include "components/keyed_service/core/keyed_service.h"
 
+class PrefService;
+
+namespace base {
+class Value;
+}  // namespace base
+
 namespace net {
 class URLRequestContextGetter;
-};
+}  // namespace net
 
 namespace domain_reliability {
 
@@ -36,23 +42,24 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityService
   static DomainReliabilityService* Create(
       const std::string& upload_reporter_string);
 
-  virtual ~DomainReliabilityService();
+  ~DomainReliabilityService() override;
 
   // Initializes the Service: given the task runner on which Monitor methods
   // should be called, creates the Monitor and returns it. Can be called at
   // most once, and must be called before any of the below methods can be
   // called. The caller is responsible for destroying the Monitor on the given
   // task runner when it is no longer needed.
-  virtual scoped_ptr<DomainReliabilityMonitor> Init(
-      scoped_refptr<base::SequencedTaskRunner> network_task_runner) = 0;
+  virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor(
+      scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) = 0;
 
   // Clears browsing data on the associated Monitor. |Init()| must have been
   // called first.
   virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode,
                                  const base::Closure& callback) = 0;
 
-  // KeyedService implementation:
-  virtual void Shutdown() OVERRIDE = 0;
+  virtual void GetWebUIData(
+      const base::Callback<void(scoped_ptr<base::Value>)>& callback)
+      const = 0;
 
  protected:
   DomainReliabilityService();