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

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

Issue 357103002: Domain Reliability: Add rudimentary WebUI page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compiler errors (cast size_t to int in WebUI code) Created 6 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « components/domain_reliability/scheduler.cc ('k') | components/domain_reliability/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
15 #include "components/domain_reliability/clear_mode.h" 15 #include "components/domain_reliability/clear_mode.h"
16 #include "components/domain_reliability/domain_reliability_export.h" 16 #include "components/domain_reliability/domain_reliability_export.h"
17 #include "components/keyed_service/core/keyed_service.h" 17 #include "components/keyed_service/core/keyed_service.h"
18 18
19 namespace base {
20 class Value;
21 } // namespace base
22
19 namespace net { 23 namespace net {
20 class URLRequestContextGetter; 24 class URLRequestContextGetter;
21 }; 25 } // namespace net
22 26
23 namespace domain_reliability { 27 namespace domain_reliability {
24 28
25 class DomainReliabilityMonitor; 29 class DomainReliabilityMonitor;
26 30
27 // DomainReliabilityService is a KeyedService that manages a Monitor that lives 31 // DomainReliabilityService is a KeyedService that manages a Monitor that lives
28 // on another thread (as provided by the URLRequestContextGetter's task runner) 32 // on another thread (as provided by the URLRequestContextGetter's task runner)
29 // and proxies (selected) method calls to it. Destruction of the Monitor (on 33 // and proxies (selected) method calls to it. Destruction of the Monitor (on
30 // that thread) is the responsibility of the caller. 34 // that thread) is the responsibility of the caller.
31 class DOMAIN_RELIABILITY_EXPORT DomainReliabilityService 35 class DOMAIN_RELIABILITY_EXPORT DomainReliabilityService
(...skipping 12 matching lines...) Expand all
44 // called. The caller is responsible for destroying the Monitor on the given 48 // called. The caller is responsible for destroying the Monitor on the given
45 // task runner when it is no longer needed. 49 // task runner when it is no longer needed.
46 virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor( 50 virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor(
47 scoped_refptr<base::SequencedTaskRunner> network_task_runner) = 0; 51 scoped_refptr<base::SequencedTaskRunner> network_task_runner) = 0;
48 52
49 // Clears browsing data on the associated Monitor. |Init()| must have been 53 // Clears browsing data on the associated Monitor. |Init()| must have been
50 // called first. 54 // called first.
51 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode, 55 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode,
52 const base::Closure& callback) = 0; 56 const base::Closure& callback) = 0;
53 57
58 virtual void GetWebUIData(
59 const base::Callback<void(scoped_ptr<base::Value>)>& callback)
60 const = 0;
61
54 protected: 62 protected:
55 DomainReliabilityService(); 63 DomainReliabilityService();
56 64
57 private: 65 private:
58 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService); 66 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityService);
59 }; 67 };
60 68
61 } // namespace domain_reliability 69 } // namespace domain_reliability
62 70
63 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_ 71 #endif // COMPONENTS_DOMAIN_RELIABILITY_SERVICE_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/scheduler.cc ('k') | components/domain_reliability/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698