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

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

Issue 291493004: Domain Reliability: Deduplicate some code into test_util (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 7 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_TEST_UTIL_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/domain_reliability/config.h"
9 #include "components/domain_reliability/monitor.h" 11 #include "components/domain_reliability/monitor.h"
12 #include "components/domain_reliability/scheduler.h"
10 #include "components/domain_reliability/uploader.h" 13 #include "components/domain_reliability/uploader.h"
11 #include "components/domain_reliability/util.h" 14 #include "components/domain_reliability/util.h"
12 #include "net/base/host_port_pair.h" 15 #include "net/base/host_port_pair.h"
13 16
14 namespace net { 17 namespace net {
15 class URLRequestStatus; 18 class URLRequestStatus;
16 } // namespace net 19 } // namespace net
17 20
18 namespace domain_reliability { 21 namespace domain_reliability {
19 22
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 108
106 int elapsed_sec() { return (now_ticks_ - epoch_ticks_).InSeconds(); } 109 int elapsed_sec() { return (now_ticks_ - epoch_ticks_).InSeconds(); }
107 110
108 base::Time now_; 111 base::Time now_;
109 base::TimeTicks now_ticks_; 112 base::TimeTicks now_ticks_;
110 base::TimeTicks epoch_ticks_; 113 base::TimeTicks epoch_ticks_;
111 int task_sequence_number_; 114 int task_sequence_number_;
112 TaskMap tasks_; 115 TaskMap tasks_;
113 }; 116 };
114 117
118 scoped_ptr<const DomainReliabilityConfig> MakeTestConfig();
119 DomainReliabilityScheduler::Params MakeTestSchedulerParams();
120
115 } // namespace domain_reliability 121 } // namespace domain_reliability
116 122
117 #endif // COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_ 123 #endif // COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/scheduler_unittest.cc ('k') | components/domain_reliability/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698