| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/render_message_filter.h" | 5 #include "chrome/browser/renderer_host/render_message_filter.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #include "chrome/browser/ui/cocoa/task_helpers.h" | 77 #include "chrome/browser/ui/cocoa/task_helpers.h" |
| 78 #include "chrome/common/font_descriptor_mac.h" | 78 #include "chrome/common/font_descriptor_mac.h" |
| 79 #include "chrome/common/font_loader_mac.h" | 79 #include "chrome/common/font_loader_mac.h" |
| 80 #endif | 80 #endif |
| 81 #if defined(OS_POSIX) | 81 #if defined(OS_POSIX) |
| 82 #include "base/file_descriptor_posix.h" | 82 #include "base/file_descriptor_posix.h" |
| 83 #endif | 83 #endif |
| 84 #if defined(OS_WIN) | 84 #if defined(OS_WIN) |
| 85 #include "chrome/common/child_process_host.h" | 85 #include "chrome/common/child_process_host.h" |
| 86 #endif | 86 #endif |
| 87 #if defined(USE_NSS) |
| 88 #include "chrome/browser/ui/pk11_password_dialog.h" |
| 89 #endif |
| 87 #if defined(USE_TCMALLOC) | 90 #if defined(USE_TCMALLOC) |
| 88 #include "chrome/browser/browser_about_handler.h" | 91 #include "chrome/browser/browser_about_handler.h" |
| 89 #endif | 92 #endif |
| 90 | 93 |
| 91 using net::CookieStore; | 94 using net::CookieStore; |
| 92 using WebKit::WebCache; | 95 using WebKit::WebCache; |
| 93 | 96 |
| 94 namespace { | 97 namespace { |
| 95 | 98 |
| 96 const int kPluginsRefreshThresholdInSeconds = 3; | 99 const int kPluginsRefreshThresholdInSeconds = 3; |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 void RenderMessageFilter::OnKeygenOnWorkerThread( | 1373 void RenderMessageFilter::OnKeygenOnWorkerThread( |
| 1371 int key_size_in_bits, | 1374 int key_size_in_bits, |
| 1372 const std::string& challenge_string, | 1375 const std::string& challenge_string, |
| 1373 const GURL& url, | 1376 const GURL& url, |
| 1374 IPC::Message* reply_msg) { | 1377 IPC::Message* reply_msg) { |
| 1375 DCHECK(reply_msg); | 1378 DCHECK(reply_msg); |
| 1376 | 1379 |
| 1377 // Generate a signed public key and challenge, then send it back. | 1380 // Generate a signed public key and challenge, then send it back. |
| 1378 net::KeygenHandler keygen_handler(key_size_in_bits, challenge_string, url); | 1381 net::KeygenHandler keygen_handler(key_size_in_bits, challenge_string, url); |
| 1379 | 1382 |
| 1383 #if defined(USE_NSS) |
| 1384 // Attach a password delegate so we can authenticate. |
| 1385 keygen_handler.set_pk11_password_delegate( |
| 1386 browser::NewPK11BlockingDialogDelegate(browser::kPK11PasswordKeygen, |
| 1387 url.host())); |
| 1388 #endif // defined(USE_NSS) |
| 1389 |
| 1380 ViewHostMsg_Keygen::WriteReplyParams( | 1390 ViewHostMsg_Keygen::WriteReplyParams( |
| 1381 reply_msg, | 1391 reply_msg, |
| 1382 keygen_handler.GenKeyAndSignChallenge()); | 1392 keygen_handler.GenKeyAndSignChallenge()); |
| 1383 | 1393 |
| 1384 BrowserThread::PostTask( | 1394 BrowserThread::PostTask( |
| 1385 BrowserThread::IO, FROM_HERE, | 1395 BrowserThread::IO, FROM_HERE, |
| 1386 NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); | 1396 NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); |
| 1387 } | 1397 } |
| 1388 | 1398 |
| 1389 #if defined(USE_TCMALLOC) | 1399 #if defined(USE_TCMALLOC) |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 } | 1619 } |
| 1610 | 1620 |
| 1611 CookiesEnabledCompletion::~CookiesEnabledCompletion() {} | 1621 CookiesEnabledCompletion::~CookiesEnabledCompletion() {} |
| 1612 | 1622 |
| 1613 void CookiesEnabledCompletion::RunWithParams(const Tuple1<int>& params) { | 1623 void CookiesEnabledCompletion::RunWithParams(const Tuple1<int>& params) { |
| 1614 bool result = params.a != net::ERR_ACCESS_DENIED; | 1624 bool result = params.a != net::ERR_ACCESS_DENIED; |
| 1615 ViewHostMsg_CookiesEnabled::WriteReplyParams(reply_msg_, result); | 1625 ViewHostMsg_CookiesEnabled::WriteReplyParams(reply_msg_, result); |
| 1616 filter_->Send(reply_msg_); | 1626 filter_->Send(reply_msg_); |
| 1617 delete this; | 1627 delete this; |
| 1618 } | 1628 } |
| OLD | NEW |