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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 42773002: Get ClientCertStore through ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win #2 Created 7 years, 1 month 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) 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #include "content/public/common/url_utils.h" 131 #include "content/public/common/url_utils.h"
132 #include "extensions/browser/view_type_utils.h" 132 #include "extensions/browser/view_type_utils.h"
133 #include "extensions/common/constants.h" 133 #include "extensions/common/constants.h"
134 #include "extensions/common/switches.h" 134 #include "extensions/common/switches.h"
135 #include "grit/generated_resources.h" 135 #include "grit/generated_resources.h"
136 #include "grit/ui_resources.h" 136 #include "grit/ui_resources.h"
137 #include "net/base/escape.h" 137 #include "net/base/escape.h"
138 #include "net/base/mime_util.h" 138 #include "net/base/mime_util.h"
139 #include "net/cookies/canonical_cookie.h" 139 #include "net/cookies/canonical_cookie.h"
140 #include "net/cookies/cookie_options.h" 140 #include "net/cookies/cookie_options.h"
141 #include "net/ssl/client_cert_store_impl.h"
141 #include "net/ssl/ssl_cert_request_info.h" 142 #include "net/ssl/ssl_cert_request_info.h"
142 #include "ppapi/host/ppapi_host.h" 143 #include "ppapi/host/ppapi_host.h"
143 #include "ui/base/l10n/l10n_util.h" 144 #include "ui/base/l10n/l10n_util.h"
144 #include "ui/base/resource/resource_bundle.h" 145 #include "ui/base/resource/resource_bundle.h"
145 #include "ui/message_center/message_center_util.h" 146 #include "ui/message_center/message_center_util.h"
146 #include "webkit/browser/fileapi/external_mount_points.h" 147 #include "webkit/browser/fileapi/external_mount_points.h"
147 #include "webkit/common/webpreferences.h" 148 #include "webkit/common/webpreferences.h"
148 149
149 #if defined(OS_WIN) 150 #if defined(OS_WIN)
150 #include "chrome/browser/chrome_browser_main_win.h" 151 #include "chrome/browser/chrome_browser_main_win.h"
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 captive_portal::CaptivePortalTabHelper::FromWebContents(tab); 1784 captive_portal::CaptivePortalTabHelper::FromWebContents(tab);
1784 if (captive_portal_tab_helper) 1785 if (captive_portal_tab_helper)
1785 captive_portal_tab_helper->OnSSLCertError(ssl_info); 1786 captive_portal_tab_helper->OnSSLCertError(ssl_info);
1786 #endif 1787 #endif
1787 1788
1788 // Otherwise, display an SSL blocking page. 1789 // Otherwise, display an SSL blocking page.
1789 new SSLBlockingPage(tab, cert_error, ssl_info, request_url, overridable, 1790 new SSLBlockingPage(tab, cert_error, ssl_info, request_url, overridable,
1790 strict_enforcement, callback); 1791 strict_enforcement, callback);
1791 } 1792 }
1792 1793
1794 scoped_ptr<net::ClientCertStore> ChromeContentBrowserClient::GetClientCertStore(
1795 content::ResourceContext* context) {
1796 #if !defined(USE_OPENSSL)
1797 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreImpl());
1798 #else
1799 return scoped_ptr<net::ClientCertStore>();
1800 #endif
1801 }
1802
1793 void ChromeContentBrowserClient::SelectClientCertificate( 1803 void ChromeContentBrowserClient::SelectClientCertificate(
1794 int render_process_id, 1804 int render_process_id,
1795 int render_view_id, 1805 int render_view_id,
1796 const net::HttpNetworkSession* network_session, 1806 const net::HttpNetworkSession* network_session,
1797 net::SSLCertRequestInfo* cert_request_info, 1807 net::SSLCertRequestInfo* cert_request_info,
1798 const base::Callback<void(net::X509Certificate*)>& callback) { 1808 const base::Callback<void(net::X509Certificate*)>& callback) {
1799 WebContents* tab = tab_util::GetWebContentsByID( 1809 WebContents* tab = tab_util::GetWebContentsByID(
1800 render_process_id, render_view_id); 1810 render_process_id, render_view_id);
1801 if (!tab) { 1811 if (!tab) {
1802 NOTREACHED(); 1812 NOTREACHED();
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, 2648 return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
2639 allowed_file_handle_origins_) || 2649 allowed_file_handle_origins_) ||
2640 IsHostAllowedByCommandLine(url, extension_set, 2650 IsHostAllowedByCommandLine(url, extension_set,
2641 switches::kAllowNaClFileHandleAPI); 2651 switches::kAllowNaClFileHandleAPI);
2642 #else 2652 #else
2643 return false; 2653 return false;
2644 #endif 2654 #endif
2645 } 2655 }
2646 2656
2647 } // namespace chrome 2657 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698