| OLD | NEW | 
|    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 #include "components/domain_reliability/monitor.h" |    5 #include "components/domain_reliability/monitor.h" | 
|    6  |    6  | 
|    7 #include "base/command_line.h" |    7 #include "base/command_line.h" | 
|    8 #include "base/logging.h" |    8 #include "base/logging.h" | 
|    9 #include "base/profiler/scoped_tracker.h" |    9 #include "base/profiler/scoped_tracker.h" | 
|   10 #include "base/single_thread_task_runner.h" |   10 #include "base/single_thread_task_runner.h" | 
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  227   return status.status() != net::URLRequestStatus::CANCELED && |  227   return status.status() != net::URLRequestStatus::CANCELED && | 
|  228      response_info.network_accessed; |  228      response_info.network_accessed; | 
|  229 } |  229 } | 
|  230  |  230  | 
|  231 DomainReliabilityContext* DomainReliabilityMonitor::AddContext( |  231 DomainReliabilityContext* DomainReliabilityMonitor::AddContext( | 
|  232     scoped_ptr<const DomainReliabilityConfig> config) { |  232     scoped_ptr<const DomainReliabilityConfig> config) { | 
|  233   DCHECK(OnNetworkThread()); |  233   DCHECK(OnNetworkThread()); | 
|  234   DCHECK(config); |  234   DCHECK(config); | 
|  235   DCHECK(config->IsValid()); |  235   DCHECK(config->IsValid()); | 
|  236  |  236  | 
 |  237   // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed. | 
 |  238   tracked_objects::ScopedTracker tracking_profile( | 
 |  239       FROM_HERE_WITH_EXPLICIT_FUNCTION( | 
 |  240           "436671 DomainReliabilityConfig::AddContext")); | 
 |  241  | 
|  237   // Grab a copy of the domain before transferring ownership of |config|. |  242   // Grab a copy of the domain before transferring ownership of |config|. | 
|  238   std::string domain = config->domain; |  243   std::string domain = config->domain; | 
|  239  |  244  | 
|  240   DomainReliabilityContext* context = |  245   DomainReliabilityContext* context = | 
|  241       new DomainReliabilityContext(time_.get(), |  246       new DomainReliabilityContext(time_.get(), | 
|  242                                    scheduler_params_, |  247                                    scheduler_params_, | 
|  243                                    upload_reporter_string_, |  248                                    upload_reporter_string_, | 
|  244                                    &last_network_change_time_, |  249                                    &last_network_change_time_, | 
|  245                                    &dispatcher_, |  250                                    &dispatcher_, | 
|  246                                    uploader_.get(), |  251                                    uploader_.get(), | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  348  |  353  | 
|  349   return NULL; |  354   return NULL; | 
|  350 } |  355 } | 
|  351  |  356  | 
|  352 base::WeakPtr<DomainReliabilityMonitor> |  357 base::WeakPtr<DomainReliabilityMonitor> | 
|  353 DomainReliabilityMonitor::MakeWeakPtr() { |  358 DomainReliabilityMonitor::MakeWeakPtr() { | 
|  354   return weak_factory_.GetWeakPtr(); |  359   return weak_factory_.GetWeakPtr(); | 
|  355 } |  360 } | 
|  356  |  361  | 
|  357 }  // namespace domain_reliability |  362 }  // namespace domain_reliability | 
| OLD | NEW |