| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/native_library.h" | 7 #include "base/native_library.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/common/external_ipc_dumper.h" | 10 #include "content/public/common/external_ipc_dumper.h" |
| 11 | 11 |
| 12 typedef IPC::ChannelProxy::OutgoingMessageFilter* (*GetFilterFunction)(); | 12 typedef IPC::ChannelProxy::OutgoingMessageFilter* (*GetFilterFunction)(); |
| 13 typedef void (*SetDumpDirectoryFunction)(const base::FilePath&); | 13 typedef void (*SetDumpDirectoryFunction)(const base::FilePath&); |
| 14 | 14 |
| 15 const char kFilterEntryName[] = "GetFilter"; | 15 const char kFilterEntryName[] = "GetFilter"; |
| 16 const char kSetDumpDirectoryEntryName[] = "SetDumpDirectory"; | 16 const char kSetDumpDirectoryEntryName[] = "SetDumpDirectory"; |
| 17 | 17 |
| 18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 19 #define IPC_MESSAGE_DUMP_MODULE FILE_PATH_LITERAL("ipc_message_dump.dll") | 19 #define IPC_MESSAGE_DUMP_MODULE FILE_PATH_LITERAL("ipc_message_dump.dll") |
| 20 #else | 20 #else |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 GetFilterFunction filter_entry_point = reinterpret_cast<GetFilterFunction>( | 53 GetFilterFunction filter_entry_point = reinterpret_cast<GetFilterFunction>( |
| 54 base::GetFunctionPointerFromNativeLibrary(library, kFilterEntryName)); | 54 base::GetFunctionPointerFromNativeLibrary(library, kFilterEntryName)); |
| 55 if (!filter_entry_point) { | 55 if (!filter_entry_point) { |
| 56 LOG(ERROR) << kFilterEntryName << " not exported by message dump module."; | 56 LOG(ERROR) << kFilterEntryName << " not exported by message dump module."; |
| 57 return NULL; | 57 return NULL; |
| 58 } | 58 } |
| 59 | 59 |
| 60 return filter_entry_point(); | 60 return filter_entry_point(); |
| 61 } | 61 } |
| OLD | NEW |