| OLD | NEW | 
|   1 // Copyright 2017 The Chromium Authors. All rights reserved. |   1 // Copyright 2017 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 #include "net/reporting/reporting_context.h" |   5 #include "net/reporting/reporting_context.h" | 
|   6  |   6  | 
|   7 #include <memory> |   7 #include <memory> | 
|   8  |   8  | 
|   9 #include "base/memory/ptr_util.h" |   9 #include "base/memory/ptr_util.h" | 
|  10 #include "base/observer_list.h" |  10 #include "base/observer_list.h" | 
|  11 #include "base/time/clock.h" |  11 #include "base/time/clock.h" | 
|  12 #include "base/time/default_clock.h" |  12 #include "base/time/default_clock.h" | 
|  13 #include "base/time/default_tick_clock.h" |  13 #include "base/time/default_tick_clock.h" | 
|  14 #include "base/time/tick_clock.h" |  14 #include "base/time/tick_clock.h" | 
|  15 #include "base/time/time.h" |  15 #include "base/time/time.h" | 
|  16 #include "net/base/backoff_entry.h" |  16 #include "net/base/backoff_entry.h" | 
|  17 #include "net/reporting/reporting_browsing_data_remover.h" |  17 #include "net/reporting/reporting_browsing_data_remover.h" | 
|  18 #include "net/reporting/reporting_cache.h" |  18 #include "net/reporting/reporting_cache.h" | 
 |  19 #include "net/reporting/reporting_delegate.h" | 
|  19 #include "net/reporting/reporting_delivery_agent.h" |  20 #include "net/reporting/reporting_delivery_agent.h" | 
|  20 #include "net/reporting/reporting_endpoint_manager.h" |  21 #include "net/reporting/reporting_endpoint_manager.h" | 
|  21 #include "net/reporting/reporting_garbage_collector.h" |  22 #include "net/reporting/reporting_garbage_collector.h" | 
|  22 #include "net/reporting/reporting_network_change_observer.h" |  23 #include "net/reporting/reporting_network_change_observer.h" | 
|  23 #include "net/reporting/reporting_observer.h" |  24 #include "net/reporting/reporting_observer.h" | 
|  24 #include "net/reporting/reporting_persister.h" |  25 #include "net/reporting/reporting_persister.h" | 
|  25 #include "net/reporting/reporting_policy.h" |  26 #include "net/reporting/reporting_policy.h" | 
|  26 #include "net/reporting/reporting_uploader.h" |  27 #include "net/reporting/reporting_uploader.h" | 
|  27  |  28  | 
|  28 namespace net { |  29 namespace net { | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  68 } |  69 } | 
|  69  |  70  | 
|  70 ReportingContext::ReportingContext(const ReportingPolicy& policy, |  71 ReportingContext::ReportingContext(const ReportingPolicy& policy, | 
|  71                                    std::unique_ptr<base::Clock> clock, |  72                                    std::unique_ptr<base::Clock> clock, | 
|  72                                    std::unique_ptr<base::TickClock> tick_clock, |  73                                    std::unique_ptr<base::TickClock> tick_clock, | 
|  73                                    std::unique_ptr<ReportingUploader> uploader) |  74                                    std::unique_ptr<ReportingUploader> uploader) | 
|  74     : policy_(policy), |  75     : policy_(policy), | 
|  75       clock_(std::move(clock)), |  76       clock_(std::move(clock)), | 
|  76       tick_clock_(std::move(tick_clock)), |  77       tick_clock_(std::move(tick_clock)), | 
|  77       uploader_(std::move(uploader)), |  78       uploader_(std::move(uploader)), | 
 |  79       delegate_(ReportingDelegate::Create()), | 
|  78       cache_(base::MakeUnique<ReportingCache>(this)), |  80       cache_(base::MakeUnique<ReportingCache>(this)), | 
|  79       endpoint_manager_(base::MakeUnique<ReportingEndpointManager>(this)), |  81       endpoint_manager_(base::MakeUnique<ReportingEndpointManager>(this)), | 
|  80       delivery_agent_(ReportingDeliveryAgent::Create(this)), |  82       delivery_agent_(ReportingDeliveryAgent::Create(this)), | 
|  81       persister_(ReportingPersister::Create(this)), |  83       persister_(ReportingPersister::Create(this)), | 
|  82       garbage_collector_(ReportingGarbageCollector::Create(this)), |  84       garbage_collector_(ReportingGarbageCollector::Create(this)), | 
|  83       network_change_observer_(ReportingNetworkChangeObserver::Create(this)), |  85       network_change_observer_(ReportingNetworkChangeObserver::Create(this)), | 
|  84       browsing_data_remover_(ReportingBrowsingDataRemover::Create(this)) {} |  86       browsing_data_remover_(ReportingBrowsingDataRemover::Create(this)) {} | 
|  85  |  87  | 
|  86 }  // namespace net |  88 }  // namespace net | 
| OLD | NEW |