Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
| 6 | 6 |
| 7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
| 8 #include "app/gfx/native_widget_types.h" | 8 #include "app/gfx/native_widget_types.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 #include "chrome/common/chrome_plugin_lib.h" | 39 #include "chrome/common/chrome_plugin_lib.h" |
| 40 #include "chrome/common/chrome_plugin_util.h" | 40 #include "chrome/common/chrome_plugin_util.h" |
| 41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 42 #include "chrome/common/histogram_synchronizer.h" | 42 #include "chrome/common/histogram_synchronizer.h" |
| 43 #include "chrome/common/notification_service.h" | 43 #include "chrome/common/notification_service.h" |
| 44 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 45 #include "chrome/common/pref_service.h" | 45 #include "chrome/common/pref_service.h" |
| 46 #include "chrome/common/render_messages.h" | 46 #include "chrome/common/render_messages.h" |
| 47 #include "chrome/common/url_constants.h" | 47 #include "chrome/common/url_constants.h" |
| 48 #include "chrome/common/worker_messages.h" | 48 #include "chrome/common/worker_messages.h" |
| 49 #include "net/base/keygen_handler.h" | |
| 49 #include "net/base/mime_util.h" | 50 #include "net/base/mime_util.h" |
| 50 #include "net/base/load_flags.h" | 51 #include "net/base/load_flags.h" |
| 51 #include "net/http/http_cache.h" | 52 #include "net/http/http_cache.h" |
| 52 #include "net/http/http_transaction_factory.h" | 53 #include "net/http/http_transaction_factory.h" |
| 53 #include "net/url_request/url_request_context.h" | 54 #include "net/url_request/url_request_context.h" |
| 54 #include "webkit/glue/plugins/plugin_list.h" | 55 #include "webkit/glue/plugins/plugin_list.h" |
| 55 #include "webkit/glue/webkit_glue.h" | 56 #include "webkit/glue/webkit_glue.h" |
| 56 #include "webkit/glue/webplugin.h" | 57 #include "webkit/glue/webplugin.h" |
| 57 | 58 |
| 58 #if defined(OS_WIN) || defined(OS_MACOSX) | 59 #if defined(OS_WIN) || defined(OS_MACOSX) |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, | 377 IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, |
| 377 OnFreeTransportDIB) | 378 OnFreeTransportDIB) |
| 378 #endif | 379 #endif |
| 379 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenChannelToExtension, | 380 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenChannelToExtension, |
| 380 OnOpenChannelToExtension) | 381 OnOpenChannelToExtension) |
| 381 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenChannelToTab, OnOpenChannelToTab) | 382 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenChannelToTab, OnOpenChannelToTab) |
| 382 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseIdleConnections, | 383 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseIdleConnections, |
| 383 OnCloseIdleConnections) | 384 OnCloseIdleConnections) |
| 384 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCacheMode, OnSetCacheMode) | 385 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCacheMode, OnSetCacheMode) |
| 385 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetFileSize, OnGetFileSize) | 386 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetFileSize, OnGetFileSize) |
| 387 IPC_MESSAGE_HANDLER(ViewHostMsg_Keygen, OnKeygen) | |
| 386 #if defined(USE_TCMALLOC) | 388 #if defined(USE_TCMALLOC) |
| 387 IPC_MESSAGE_HANDLER(ViewHostMsg_RendererTcmalloc, OnRendererTcmalloc) | 389 IPC_MESSAGE_HANDLER(ViewHostMsg_RendererTcmalloc, OnRendererTcmalloc) |
| 388 #endif | 390 #endif |
| 389 | 391 |
| 390 IPC_MESSAGE_UNHANDLED( | 392 IPC_MESSAGE_UNHANDLED( |
| 391 handled = false) | 393 handled = false) |
| 392 IPC_END_MESSAGE_MAP_EX() | 394 IPC_END_MESSAGE_MAP_EX() |
| 393 } | 395 } |
| 394 | 396 |
| 395 if (!msg_is_ok) { | 397 if (!msg_is_ok) { |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1088 | 1090 |
| 1089 void ResourceMessageFilter::ReplyGetFileSize(int64 result, void* param) { | 1091 void ResourceMessageFilter::ReplyGetFileSize(int64 result, void* param) { |
| 1090 IPC::Message* reply_msg = static_cast<IPC::Message*>(param); | 1092 IPC::Message* reply_msg = static_cast<IPC::Message*>(param); |
| 1091 ViewHostMsg_GetFileSize::WriteReplyParams(reply_msg, result); | 1093 ViewHostMsg_GetFileSize::WriteReplyParams(reply_msg, result); |
| 1092 Send(reply_msg); | 1094 Send(reply_msg); |
| 1093 | 1095 |
| 1094 // Getting file size callback done, decrease the ref count. | 1096 // Getting file size callback done, decrease the ref count. |
| 1095 Release(); | 1097 Release(); |
| 1096 } | 1098 } |
| 1097 | 1099 |
| 1100 void ResourceMessageFilter::OnKeygen(uint32 key_size_index, | |
| 1101 const std::string& challenge_string, | |
| 1102 const GURL& url, | |
| 1103 std::string* signed_public_key) { | |
| 1104 scoped_ptr<net::KeygenHandler> keygen_handler( | |
| 1105 new net::KeygenHandler(keysize_index, | |
|
wtc
2009/10/15 23:05:34
This file doesn't compile because keysize_index an
gauravsh
2009/10/15 23:09:39
Ah sorry, I forgot to try a compilation before upl
| |
| 1106 challenge_string)); | |
| 1107 *signed_publickey = keygen_handler->GenKeyAndSignChallenge(); | |
| 1108 } | |
| 1109 | |
| 1098 #if defined(USE_TCMALLOC) | 1110 #if defined(USE_TCMALLOC) |
| 1099 void ResourceMessageFilter::OnRendererTcmalloc(base::ProcessId pid, | 1111 void ResourceMessageFilter::OnRendererTcmalloc(base::ProcessId pid, |
| 1100 const std::string& output) { | 1112 const std::string& output) { |
| 1101 ui_loop()->PostTask(FROM_HERE, | 1113 ui_loop()->PostTask(FROM_HERE, |
| 1102 NewRunnableFunction(AboutTcmallocRendererCallback, pid, output)); | 1114 NewRunnableFunction(AboutTcmallocRendererCallback, pid, output)); |
| 1103 } | 1115 } |
| 1104 #endif | 1116 #endif |
| OLD | NEW |