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

Unified Diff: chrome/common/external_ipc_dumper.cc

Issue 2043933002: Move IPC fuzzer switches and helpers from chrome/common to content/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove CONTENT_EXPORT Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/external_ipc_dumper.h ('k') | chrome/renderer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/external_ipc_dumper.cc
diff --git a/chrome/common/external_ipc_dumper.cc b/chrome/common/external_ipc_dumper.cc
deleted file mode 100644
index 4e0d671be7260ed75483b0b4f9aafe58981f2a66..0000000000000000000000000000000000000000
--- a/chrome/common/external_ipc_dumper.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/files/file_path.h"
-#include "base/logging.h"
-#include "base/native_library.h"
-#include "base/path_service.h"
-#include "build/build_config.h"
-#include "chrome/common/external_ipc_dumper.h"
-
-typedef IPC::ChannelProxy::OutgoingMessageFilter* (*GetFilterFunction)();
-typedef void (*SetDumpDirectoryFunction)(const base::FilePath&);
-
-const char kFilterEntryName[] = "GetFilter";
-const char kSetDumpDirectoryEntryName[] = "SetDumpDirectory";
-
-#if defined(OS_WIN)
-#define IPC_MESSAGE_DUMP_MODULE FILE_PATH_LITERAL("ipc_message_dump.dll")
-#else
-#define IPC_MESSAGE_DUMP_MODULE FILE_PATH_LITERAL("libipc_message_dump.so")
-#endif
-
-IPC::ChannelProxy::OutgoingMessageFilter* LoadExternalIPCDumper(
- const base::FilePath& dump_directory) {
- base::FilePath module_path;
- if (!PathService::Get(base::DIR_MODULE, &module_path)) {
- LOG(ERROR) << "Unable to get message dump module directory.";
- return NULL;
- }
-
- base::FilePath library_path = module_path.Append(IPC_MESSAGE_DUMP_MODULE);
- base::NativeLibraryLoadError load_error;
- base::NativeLibrary library =
- base::LoadNativeLibrary(library_path, &load_error);
-
- if (!library) {
- LOG(ERROR) << load_error.ToString();
- return NULL;
- }
-
- SetDumpDirectoryFunction set_directory_entry_point =
- reinterpret_cast<SetDumpDirectoryFunction>(
- base::GetFunctionPointerFromNativeLibrary(
- library, kSetDumpDirectoryEntryName));
- if (!set_directory_entry_point) {
- LOG(ERROR) << kSetDumpDirectoryEntryName
- << " not exported by message dump module.";
- return NULL;
- }
- set_directory_entry_point(dump_directory);
-
- GetFilterFunction filter_entry_point = reinterpret_cast<GetFilterFunction>(
- base::GetFunctionPointerFromNativeLibrary(library, kFilterEntryName));
- if (!filter_entry_point) {
- LOG(ERROR) << kFilterEntryName << " not exported by message dump module.";
- return NULL;
- }
-
- return filter_entry_point();
-}
« no previous file with comments | « chrome/common/external_ipc_dumper.h ('k') | chrome/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698