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

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

Issue 615313006: Domain Reliability: Get correct reporting pref once, on startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflict Created 6 years, 2 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
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"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
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