| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ | 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ |
| 6 #define COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ | 6 #define COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const std::string& upload_reporter_string); | 43 const std::string& upload_reporter_string); |
| 44 | 44 |
| 45 virtual ~DomainReliabilityService(); | 45 virtual ~DomainReliabilityService(); |
| 46 | 46 |
| 47 // Initializes the Service: given the task runner on which Monitor methods | 47 // Initializes the Service: given the task runner on which Monitor methods |
| 48 // should be called, creates the Monitor and returns it. Can be called at | 48 // should be called, creates the Monitor and returns it. Can be called at |
| 49 // most once, and must be called before any of the below methods can be | 49 // most once, and must be called before any of the below methods can be |
| 50 // called. The caller is responsible for destroying the Monitor on the given | 50 // called. The caller is responsible for destroying the Monitor on the given |
| 51 // task runner when it is no longer needed. | 51 // task runner when it is no longer needed. |
| 52 virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor( | 52 virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor( |
| 53 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 53 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) = 0; |
| 54 PrefService* pref_service, | |
| 55 const char* reporting_pref_name) = 0; | |
| 56 | 54 |
| 57 // Clears browsing data on the associated Monitor. |Init()| must have been | 55 // Clears browsing data on the associated Monitor. |Init()| must have been |
| 58 // called first. | 56 // called first. |
| 59 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode, | 57 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode, |
| 60 const base::Closure& callback) = 0; | 58 const base::Closure& callback) = 0; |
| 61 | 59 |
| 62 virtual void GetWebUIData( | 60 virtual void GetWebUIData( |
| 63 const base::Callback<void(scoped_ptr<base::Value>)>& callback) | 61 const base::Callback<void(scoped_ptr<base::Value>)>& callback) |
| 64 const = 0; | 62 const = 0; |
| 65 | 63 |
| 66 protected: | 64 protected: |
| 67 DomainReliabilityService(); | 65 DomainReliabilityService(); |
| 68 | 66 |
| 69 private: | 67 private: |
| 70 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService); | 68 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService); |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 } // namespace domain_reliability | 71 } // namespace domain_reliability |
| 74 | 72 |
| 75 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ | 73 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ |
| OLD | NEW |