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

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

Issue 404363003: Domain Reliability: Add wildcard domain support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, finally Created 6 years, 4 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
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_MONITOR_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 }; 105 };
106 106
107 // Creates a context, adds it to the monitor, and returns a pointer to it. 107 // Creates a context, adds it to the monitor, and returns a pointer to it.
108 // (The pointer is only valid until the Monitor is destroyed.) 108 // (The pointer is only valid until the Monitor is destroyed.)
109 DomainReliabilityContext* AddContext( 109 DomainReliabilityContext* AddContext(
110 scoped_ptr<const DomainReliabilityConfig> config); 110 scoped_ptr<const DomainReliabilityConfig> config);
111 // Deletes all contexts from |contexts_| and clears the map. 111 // Deletes all contexts from |contexts_| and clears the map.
112 void ClearContexts(); 112 void ClearContexts();
113 void OnRequestLegComplete(const RequestInfo& info); 113 void OnRequestLegComplete(const RequestInfo& info);
114 114
115 DomainReliabilityContext* GetContextForHost(const std::string& host) const;
116
115 base::WeakPtr<DomainReliabilityMonitor> MakeWeakPtr(); 117 base::WeakPtr<DomainReliabilityMonitor> MakeWeakPtr();
116 118
117 scoped_ptr<base::ThreadChecker> thread_checker_; 119 scoped_ptr<base::ThreadChecker> thread_checker_;
118 scoped_ptr<MockableTime> time_; 120 scoped_ptr<MockableTime> time_;
119 const std::string upload_reporter_string_; 121 const std::string upload_reporter_string_;
120 DomainReliabilityScheduler::Params scheduler_params_; 122 DomainReliabilityScheduler::Params scheduler_params_;
121 DomainReliabilityDispatcher dispatcher_; 123 DomainReliabilityDispatcher dispatcher_;
122 scoped_ptr<DomainReliabilityUploader> uploader_; 124 scoped_ptr<DomainReliabilityUploader> uploader_;
123 ContextMap contexts_; 125 ContextMap contexts_;
124 126
125 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; 127 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_;
126 128
127 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); 129 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor);
128 }; 130 };
129 131
130 } // namespace domain_reliability 132 } // namespace domain_reliability
131 133
132 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ 134 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/context_unittest.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698