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

Unified Diff: base/profiler/stack_sampling_profiler_unittest.cc

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: rebase 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 | « base/native_library_win.cc ('k') | base/scoped_native_library_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/stack_sampling_profiler_unittest.cc
diff --git a/base/profiler/stack_sampling_profiler_unittest.cc b/base/profiler/stack_sampling_profiler_unittest.cc
index 9a644c3e2105bb27bdbce095175387d0d999ff98..3a59e6d2c300ff58534d4cac8b8e80a9ea1fd2c0 100644
--- a/base/profiler/stack_sampling_profiler_unittest.cc
+++ b/base/profiler/stack_sampling_profiler_unittest.cc
@@ -85,7 +85,7 @@ using TargetFunction = const void*(*)(WaitableEvent*, WaitableEvent*,
// SignalAndWaitUntilSignaled() when coordinated with the main thread.
class TargetThread : public PlatformThread::Delegate {
public:
- TargetThread(const StackConfiguration& stack_config);
+ explicit TargetThread(const StackConfiguration& stack_config);
// PlatformThread::Delegate:
void ThreadMain() override;
@@ -271,9 +271,8 @@ NativeLibrary LoadOtherLibrary() {
const auto load = [](NativeLibrary* library) {
FilePath other_library_path;
ASSERT_TRUE(PathService::Get(DIR_EXE, &other_library_path));
- other_library_path = other_library_path.Append(FilePath::FromUTF16Unsafe(
- GetNativeLibraryName(ASCIIToUTF16(
- "base_profiler_test_support_library"))));
+ other_library_path = other_library_path.AppendASCII(
+ GetNativeLibraryName("base_profiler_test_support_library"));
NativeLibraryLoadError load_error;
*library = LoadNativeLibrary(other_library_path, &load_error);
ASSERT_TRUE(*library) << "error loading " << other_library_path.value()
@@ -417,7 +416,7 @@ std::string FormatSampleForDiagnosticOutput(
const Sample& sample,
const std::vector<Module>& modules) {
std::string output;
- for (const Frame& frame: sample) {
+ for (const Frame& frame : sample) {
output += StringPrintf(
"0x%p %s\n", reinterpret_cast<const void*>(frame.instruction_pointer),
modules[frame.module_index].filename.AsUTF8Unsafe().c_str());
« no previous file with comments | « base/native_library_win.cc ('k') | base/scoped_native_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698