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

Side by Side Diff: chrome/browser/ssl/ssl_client_certificate_selector_test.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ssl/ssl_client_auth_observer.cc ('k') | chrome/browser/ssl/ssl_error_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/ssl_client_certificate_selector_test.h" 5 #include "chrome/browser/ssl/ssl_client_certificate_selector_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 18 matching lines...) Expand all
29 : io_loop_finished_event_(false, false) { 29 : io_loop_finished_event_(false, false) {
30 } 30 }
31 31
32 SSLClientCertificateSelectorTestBase::~SSLClientCertificateSelectorTestBase() { 32 SSLClientCertificateSelectorTestBase::~SSLClientCertificateSelectorTestBase() {
33 } 33 }
34 34
35 void SSLClientCertificateSelectorTestBase::SetUpInProcessBrowserTestFixture() { 35 void SSLClientCertificateSelectorTestBase::SetUpInProcessBrowserTestFixture() {
36 base::FilePath certs_dir = net::GetTestCertsDirectory(); 36 base::FilePath certs_dir = net::GetTestCertsDirectory();
37 37
38 mit_davidben_cert_ = net::ImportCertFromFile(certs_dir, "mit.davidben.der"); 38 mit_davidben_cert_ = net::ImportCertFromFile(certs_dir, "mit.davidben.der");
39 ASSERT_TRUE(mit_davidben_cert_); 39 ASSERT_TRUE(mit_davidben_cert_.get());
40 40
41 foaf_me_chromium_test_cert_ = net::ImportCertFromFile( 41 foaf_me_chromium_test_cert_ = net::ImportCertFromFile(
42 certs_dir, "foaf.me.chromium-test-cert.der"); 42 certs_dir, "foaf.me.chromium-test-cert.der");
43 ASSERT_TRUE(foaf_me_chromium_test_cert_); 43 ASSERT_TRUE(foaf_me_chromium_test_cert_.get());
44 44
45 cert_request_info_ = new net::SSLCertRequestInfo; 45 cert_request_info_ = new net::SSLCertRequestInfo;
46 cert_request_info_->host_and_port = "foo:123"; 46 cert_request_info_->host_and_port = "foo:123";
47 cert_request_info_->client_certs.push_back(mit_davidben_cert_); 47 cert_request_info_->client_certs.push_back(mit_davidben_cert_);
48 cert_request_info_->client_certs.push_back(foaf_me_chromium_test_cert_); 48 cert_request_info_->client_certs.push_back(foaf_me_chromium_test_cert_);
49 } 49 }
50 50
51 void SSLClientCertificateSelectorTestBase::SetUpOnMainThread() { 51 void SSLClientCertificateSelectorTestBase::SetUpOnMainThread() {
52 url_request_context_getter_ = browser()->profile()->GetRequestContext(); 52 url_request_context_getter_ = browser()->profile()->GetRequestContext();
53 53
(...skipping 17 matching lines...) Expand all
71 FROM_HERE, 71 FROM_HERE,
72 base::Bind(&SSLClientCertificateSelectorTestBase::CleanUpOnIOThread, 72 base::Bind(&SSLClientCertificateSelectorTestBase::CleanUpOnIOThread,
73 this)); 73 this));
74 74
75 io_loop_finished_event_.Wait(); 75 io_loop_finished_event_.Wait();
76 76
77 auth_requestor_ = NULL; 77 auth_requestor_ = NULL;
78 } 78 }
79 79
80 void SSLClientCertificateSelectorTestBase::SetUpOnIOThread() { 80 void SSLClientCertificateSelectorTestBase::SetUpOnIOThread() {
81 url_request_ = MakeURLRequest(url_request_context_getter_); 81 url_request_ = MakeURLRequest(url_request_context_getter_.get());
82 82
83 auth_requestor_ = new StrictMock<SSLClientAuthRequestorMock>( 83 auth_requestor_ = new StrictMock<SSLClientAuthRequestorMock>(
84 url_request_, 84 url_request_,
85 cert_request_info_); 85 cert_request_info_);
86 86
87 io_loop_finished_event_.Signal(); 87 io_loop_finished_event_.Signal();
88 } 88 }
89 89
90 void SSLClientCertificateSelectorTestBase::CleanUpOnIOThread() { 90 void SSLClientCertificateSelectorTestBase::CleanUpOnIOThread() {
91 delete url_request_; 91 delete url_request_;
92 92
93 io_loop_finished_event_.Signal(); 93 io_loop_finished_event_.Signal();
94 } 94 }
95 95
96 net::URLRequest* SSLClientCertificateSelectorTestBase::MakeURLRequest( 96 net::URLRequest* SSLClientCertificateSelectorTestBase::MakeURLRequest(
97 net::URLRequestContextGetter* context_getter) { 97 net::URLRequestContextGetter* context_getter) {
98 net::URLRequest* request = 98 net::URLRequest* request =
99 context_getter->GetURLRequestContext()->CreateRequest( 99 context_getter->GetURLRequestContext()->CreateRequest(
100 GURL("https://example"), NULL); 100 GURL("https://example"), NULL);
101 return request; 101 return request;
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_client_auth_observer.cc ('k') | chrome/browser/ssl/ssl_error_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698