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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 6487012: Clear the SSL Client Auth cache when a new SSL Client Certificate is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file contains an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 getter.get(), &CookieGetter::Get, url)); 878 getter.get(), &CookieGetter::Get, url));
879 879
880 return getter->GetResult(); 880 return getter->GetResult();
881 } 881 }
882 882
883 // static 883 // static
884 bool SimpleResourceLoaderBridge::EnsureIOThread() { 884 bool SimpleResourceLoaderBridge::EnsureIOThread() {
885 if (g_io_thread) 885 if (g_io_thread)
886 return true; 886 return true;
887 887
888 #if defined(OS_WIN)
889 // Use NSS for SSL on Windows. TODO(wtc): this should eventually be hidden
890 // inside DefaultClientSocketFactory::CreateSSLClientSocket.
891 net::ClientSocketFactory::SetSSLClientSocketFactory(
892 net::SSLClientSocketNSSFactory);
893 #endif
894 #if defined(OS_MACOSX) || defined(OS_WIN) 888 #if defined(OS_MACOSX) || defined(OS_WIN)
895 // We want to be sure to init NSPR on the main thread. 889 // We want to be sure to init NSPR on the main thread.
896 base::EnsureNSPRInit(); 890 base::EnsureNSPRInit();
897 #endif 891 #endif
898 892
899 // Create the cache thread. We want the cache thread to outlive the IO thread, 893 // Create the cache thread. We want the cache thread to outlive the IO thread,
900 // so its lifetime is bonded to the IO thread lifetime. 894 // so its lifetime is bonded to the IO thread lifetime.
901 DCHECK(!g_cache_thread); 895 DCHECK(!g_cache_thread);
902 g_cache_thread = new base::Thread("cache"); 896 g_cache_thread = new base::Thread("cache");
903 CHECK(g_cache_thread->StartWithOptions( 897 CHECK(g_cache_thread->StartWithOptions(
(...skipping 24 matching lines...) Expand all
928 922
929 // static 923 // static
930 scoped_refptr<base::MessageLoopProxy> 924 scoped_refptr<base::MessageLoopProxy>
931 SimpleResourceLoaderBridge::GetIoThread() { 925 SimpleResourceLoaderBridge::GetIoThread() {
932 if (!EnsureIOThread()) { 926 if (!EnsureIOThread()) {
933 LOG(DFATAL) << "Failed to create IO thread."; 927 LOG(DFATAL) << "Failed to create IO thread.";
934 return NULL; 928 return NULL;
935 } 929 }
936 return g_io_thread->message_loop_proxy(); 930 return g_io_thread->message_loop_proxy();
937 } 931 }
OLDNEW
« net/socket/ssl_client_socket.h ('K') | « net/socket/ssl_client_socket_win_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698