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

Unified Diff: chrome/common/profiling/memlog_sender.cc

Issue 2948283002: Profiling process topology (Closed)
Patch Set: Review comments Created 3 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/profiling/memlog_sender.h ('k') | chrome/profiling/memlog_stream_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/profiling/memlog_sender.cc
diff --git a/chrome/common/profiling/memlog_sender.cc b/chrome/common/profiling/memlog_sender.cc
index 4b3160b7261d8962fc636fae4852387684bc1325..29d066f48c742328f300fe7d2752ca05ef51b707 100644
--- a/chrome/common/profiling/memlog_sender.cc
+++ b/chrome/common/profiling/memlog_sender.cc
@@ -5,6 +5,7 @@
#include "chrome/common/profiling/memlog_sender.h"
#include "base/command_line.h"
+#include "base/strings/utf_string_conversions.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/profiling/memlog_allocator_shim.h"
#include "chrome/common/profiling/memlog_sender_pipe.h"
@@ -13,12 +14,13 @@
namespace profiling {
void InitMemlogSenderIfNecessary(const base::CommandLine& cmdline) {
- base::CommandLine::StringType pipe_id =
- cmdline.GetSwitchValueNative(switches::kMemlogPipe);
- if (pipe_id.empty())
- return; // No pipe, don't run.
+ std::string pipe_id = cmdline.GetSwitchValueASCII(switches::kMemlogPipe);
+ if (!pipe_id.empty())
+ StartMemlogSender(pipe_id);
+}
- static MemlogSenderPipe pipe(pipe_id);
+void StartMemlogSender(const std::string& pipe_id) {
+ static MemlogSenderPipe pipe(base::UTF8ToUTF16(pipe_id));
pipe.Connect();
StreamHeader header;
« no previous file with comments | « chrome/common/profiling/memlog_sender.h ('k') | chrome/profiling/memlog_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698