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

Side by Side Diff: net/test/url_request/ssl_certificate_error_job.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/url_request/ssl_certificate_error_job.h" 5 #include "net/test/url_request/ssl_certificate_error_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void SSLCertificateErrorJob::Start() { 48 void SSLCertificateErrorJob::Start() {
49 base::ThreadTaskRunnerHandle::Get()->PostTask( 49 base::ThreadTaskRunnerHandle::Get()->PostTask(
50 FROM_HERE, base::Bind(&SSLCertificateErrorJob::NotifyError, 50 FROM_HERE, base::Bind(&SSLCertificateErrorJob::NotifyError,
51 weak_factory_.GetWeakPtr())); 51 weak_factory_.GetWeakPtr()));
52 } 52 }
53 53
54 void SSLCertificateErrorJob::AddUrlHandler() { 54 void SSLCertificateErrorJob::AddUrlHandler() {
55 URLRequestFilter* filter = URLRequestFilter::GetInstance(); 55 URLRequestFilter* filter = URLRequestFilter::GetInstance();
56 filter->AddHostnameInterceptor( 56 filter->AddHostnameInterceptor(
57 "https", kMockHostname, 57 "https", kMockHostname,
58 scoped_ptr<URLRequestInterceptor>(new MockJobInterceptor())); 58 std::unique_ptr<URLRequestInterceptor>(new MockJobInterceptor()));
59 } 59 }
60 60
61 GURL SSLCertificateErrorJob::GetMockUrl() { 61 GURL SSLCertificateErrorJob::GetMockUrl() {
62 return GURL(base::StringPrintf("https://%s", kMockHostname)); 62 return GURL(base::StringPrintf("https://%s", kMockHostname));
63 } 63 }
64 64
65 SSLCertificateErrorJob::~SSLCertificateErrorJob() { 65 SSLCertificateErrorJob::~SSLCertificateErrorJob() {
66 } 66 }
67 67
68 void SSLCertificateErrorJob::NotifyError() { 68 void SSLCertificateErrorJob::NotifyError() {
69 SSLInfo info; 69 SSLInfo info;
70 info.cert_status = CERT_STATUS_DATE_INVALID; 70 info.cert_status = CERT_STATUS_DATE_INVALID;
71 NotifySSLCertificateError(info, true); 71 NotifySSLCertificateError(info, true);
72 } 72 }
73 73
74 } // namespace net 74 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/spawner_communicator.cc ('k') | net/test/url_request/url_request_failed_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698