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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 206453002: Introduce USE_OPENSSL_CERTS for certificate handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 (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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 6926 matching lines...) Expand 10 before | Expand all | Expand 10 after
6937 #else 6937 #else
6938 return false; 6938 return false;
6939 #endif 6939 #endif
6940 } 6940 }
6941 6941
6942 // SystemUsesChromiumEVMetadata returns true iff the current operating system 6942 // SystemUsesChromiumEVMetadata returns true iff the current operating system
6943 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then 6943 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then
6944 // several tests are effected because our testing EV certificate won't be 6944 // several tests are effected because our testing EV certificate won't be
6945 // recognised as EV. 6945 // recognised as EV.
6946 static bool SystemUsesChromiumEVMetadata() { 6946 static bool SystemUsesChromiumEVMetadata() {
6947 #if defined(USE_OPENSSL) 6947 #if defined(USE_OPENSSL_CERTS) || defined(OS_ANDROID)
wtc 2014/03/20 21:14:56 I think this function should return false on Andro
haavardm 2014/03/21 13:08:21 Thanks, I was quite unsure about this one. I'll do
6948 // http://crbug.com/117478 - OpenSSL does not support EV validation. 6948 // http://crbug.com/117478 - OpenSSL does not support EV validation.
6949 return false; 6949 return false;
6950 #elif defined(OS_MACOSX) && !defined(OS_IOS) 6950 #elif defined(OS_MACOSX) && !defined(OS_IOS)
6951 // On OS X, we use the system to tell us whether a certificate is EV or not 6951 // On OS X, we use the system to tell us whether a certificate is EV or not
6952 // and the system won't recognise our testing root. 6952 // and the system won't recognise our testing root.
6953 return false; 6953 return false;
6954 #else 6954 #else
6955 return true; 6955 return true;
6956 #endif 6956 #endif
6957 } 6957 }
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
7668 7668
7669 EXPECT_FALSE(r.is_pending()); 7669 EXPECT_FALSE(r.is_pending());
7670 EXPECT_EQ(1, d->response_started_count()); 7670 EXPECT_EQ(1, d->response_started_count());
7671 EXPECT_FALSE(d->received_data_before_response()); 7671 EXPECT_FALSE(d->received_data_before_response());
7672 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7672 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7673 } 7673 }
7674 } 7674 }
7675 #endif // !defined(DISABLE_FTP_SUPPORT) 7675 #endif // !defined(DISABLE_FTP_SUPPORT)
7676 7676
7677 } // namespace net 7677 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698