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

Side by Side Diff: content/browser/loader/resource_loader_unittest.cc

Issue 780383002: Don't key client auth on HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // Test browser client that captures calls to SelectClientCertificates and 225 // Test browser client that captures calls to SelectClientCertificates and
226 // records the arguments of the most recent call for later inspection. 226 // records the arguments of the most recent call for later inspection.
227 class SelectCertificateBrowserClient : public TestContentBrowserClient { 227 class SelectCertificateBrowserClient : public TestContentBrowserClient {
228 public: 228 public:
229 SelectCertificateBrowserClient() : call_count_(0) {} 229 SelectCertificateBrowserClient() : call_count_(0) {}
230 230
231 void SelectClientCertificate( 231 void SelectClientCertificate(
232 int render_process_id, 232 int render_process_id,
233 int render_view_id, 233 int render_view_id,
234 const net::HttpNetworkSession* network_session,
235 net::SSLCertRequestInfo* cert_request_info, 234 net::SSLCertRequestInfo* cert_request_info,
236 const base::Callback<void(net::X509Certificate*)>& callback) override { 235 const base::Callback<void(net::X509Certificate*)>& callback) override {
237 ++call_count_; 236 ++call_count_;
238 passed_certs_ = cert_request_info->client_certs; 237 passed_certs_ = cert_request_info->client_certs;
239 } 238 }
240 239
241 int call_count() { 240 int call_count() {
242 return call_count_; 241 return call_count_;
243 } 242 }
244 243
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); 721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents));
723 EXPECT_EQ(test_data(), contents); 722 EXPECT_EQ(test_data(), contents);
724 723
725 // Release the loader. The file should be gone now. 724 // Release the loader. The file should be gone now.
726 ReleaseLoader(); 725 ReleaseLoader();
727 base::RunLoop().RunUntilIdle(); 726 base::RunLoop().RunUntilIdle();
728 EXPECT_FALSE(base::PathExists(temp_path())); 727 EXPECT_FALSE(base::PathExists(temp_path()));
729 } 728 }
730 729
731 } // namespace content 730 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc ('k') | content/browser/ssl/ssl_client_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698