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

Side by Side Diff: chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc

Issue 2909123003: Replace deprecated base::NonThreadSafe in chrome/browser/safe_browsing in favor of SequenceChecker. (Closed)
Patch Set: remove include too Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/safe_browsing/certificate_reporting_service_test_utils. h" 5 #include "chrome/browser/safe_browsing/certificate_reporting_service_test_utils. h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "components/certificate_reporting/encrypted_cert_logger.pb.h" 8 #include "components/certificate_reporting/encrypted_cert_logger.pb.h"
9 #include "components/certificate_reporting/error_report.h" 9 #include "components/certificate_reporting/error_report.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 net::NetworkDelegate* network_delegate, 156 net::NetworkDelegate* network_delegate,
157 const base::Callback<void()>& destruction_callback) 157 const base::Callback<void()>& destruction_callback)
158 : net::URLRequestJob(request, network_delegate), 158 : net::URLRequestJob(request, network_delegate),
159 delayed_(delayed), 159 delayed_(delayed),
160 should_fail_(should_fail), 160 should_fail_(should_fail),
161 started_(false), 161 started_(false),
162 destruction_callback_(destruction_callback), 162 destruction_callback_(destruction_callback),
163 weak_factory_(this) {} 163 weak_factory_(this) {}
164 164
165 DelayableCertReportURLRequestJob::~DelayableCertReportURLRequestJob() { 165 DelayableCertReportURLRequestJob::~DelayableCertReportURLRequestJob() {
166 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
166 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 167 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
167 destruction_callback_); 168 destruction_callback_);
168 } 169 }
169 170
170 base::WeakPtr<DelayableCertReportURLRequestJob> 171 base::WeakPtr<DelayableCertReportURLRequestJob>
171 DelayableCertReportURLRequestJob::GetWeakPtr() { 172 DelayableCertReportURLRequestJob::GetWeakPtr() {
172 return weak_factory_.GetWeakPtr(); 173 return weak_factory_.GetWeakPtr();
173 } 174 }
174 175
175 void DelayableCertReportURLRequestJob::Start() { 176 void DelayableCertReportURLRequestJob::Start() {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 438
438 if (service->GetReporterForTesting()) { 439 if (service->GetReporterForTesting()) {
439 // Reporter can be null if reporting is disabled. 440 // Reporter can be null if reporting is disabled.
440 EXPECT_EQ( 441 EXPECT_EQ(
441 0u, 442 0u,
442 service->GetReporterForTesting()->inflight_report_count_for_testing()); 443 service->GetReporterForTesting()->inflight_report_count_for_testing());
443 } 444 }
444 } 445 }
445 446
446 } // namespace certificate_reporting_test_utils 447 } // namespace certificate_reporting_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698