Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: components/domain_reliability/service.h

Issue 2336043007: Domain Reliability: Don't crash on shutdown with uploads pending (Closed)
Patch Set: Remove outdated comment. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/domain_reliability/monitor_unittest.cc ('k') | components/domain_reliability/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698