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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "components/domain_reliability/clear_mode.h" | 15 #include "components/domain_reliability/clear_mode.h" |
| 16 #include "components/domain_reliability/config.h" |
16 #include "components/domain_reliability/domain_reliability_export.h" | 17 #include "components/domain_reliability/domain_reliability_export.h" |
17 #include "components/keyed_service/core/keyed_service.h" | 18 #include "components/keyed_service/core/keyed_service.h" |
18 | 19 |
19 class GURL; | 20 class GURL; |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class Value; | 23 class Value; |
23 } // namespace base | 24 } // namespace base |
24 | 25 |
25 namespace net { | 26 namespace net { |
(...skipping 30 matching lines...) Expand all Loading... |
56 // called first. | 57 // called first. |
57 virtual void ClearBrowsingData( | 58 virtual void ClearBrowsingData( |
58 DomainReliabilityClearMode clear_mode, | 59 DomainReliabilityClearMode clear_mode, |
59 const base::Callback<bool(const GURL&)>& origin, | 60 const base::Callback<bool(const GURL&)>& origin, |
60 const base::Closure& callback) = 0; | 61 const base::Closure& callback) = 0; |
61 | 62 |
62 virtual void GetWebUIData( | 63 virtual void GetWebUIData( |
63 const base::Callback<void(std::unique_ptr<base::Value>)>& callback) | 64 const base::Callback<void(std::unique_ptr<base::Value>)>& callback) |
64 const = 0; | 65 const = 0; |
65 | 66 |
| 67 virtual void SetDiscardUploadsForTesting( |
| 68 bool discard_uploads) = 0; |
| 69 |
| 70 virtual void AddContextForTesting( |
| 71 std::unique_ptr<const DomainReliabilityConfig> config) = 0; |
| 72 |
| 73 virtual void ForceUploadsForTesting() = 0; |
| 74 |
66 protected: | 75 protected: |
67 DomainReliabilityService(); | 76 DomainReliabilityService(); |
68 | 77 |
69 private: | 78 private: |
70 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService); | 79 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService); |
71 }; | 80 }; |
72 | 81 |
73 } // namespace domain_reliability | 82 } // namespace domain_reliability |
74 | 83 |
75 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ | 84 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ |
OLD | NEW |