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

Unified Diff: base/task_scheduler/task_scheduler.h

Issue 2817523004: Use StringPiece for TaskScheduler name. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | base/task_scheduler/task_scheduler.cc » ('j') | base/task_scheduler/task_scheduler_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler.h
diff --git a/base/task_scheduler/task_scheduler.h b/base/task_scheduler/task_scheduler.h
index 26f33adfefa1d207c8573da4b4d132b6f09cf396..5525aac31a063aaf16b285f786f2b3289f417416 100644
--- a/base/task_scheduler/task_scheduler.h
+++ b/base/task_scheduler/task_scheduler.h
@@ -6,7 +6,6 @@
#define BASE_TASK_SCHEDULER_TASK_SCHEDULER_H_
#include <memory>
-#include <string>
#include <vector>
#include "base/base_export.h"
@@ -14,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
+#include "base/strings/string_piece.h"
#include "base/task_runner.h"
#include "base/task_scheduler/scheduler_worker_pool_params.h"
#include "base/task_scheduler/task_traits.h"
@@ -137,7 +137,7 @@ class BASE_EXPORT TaskScheduler {
// label threads and histograms. It should identify the component that calls
// this. CHECKs on failure. For tests, prefer base::test::ScopedTaskScheduler
// (ensures isolation).
- static void CreateAndSetSimpleTaskScheduler(const std::string& name);
+ static void CreateAndSetSimpleTaskScheduler(StringPiece name);
#endif // !defined(OS_NACL)
// Creates and sets a task scheduler using custom params. |name| is used to
@@ -148,7 +148,7 @@ class BASE_EXPORT TaskScheduler {
//
// Note: The names and priority hints in |init_params| are ignored (ref. TODO
// to remove them).
- static void CreateAndSetDefaultTaskScheduler(const std::string& name,
+ static void CreateAndSetDefaultTaskScheduler(StringPiece name,
const InitParams& init_params);
// Registers |task_scheduler| to handle tasks posted through the post_task.h
« no previous file with comments | « no previous file | base/task_scheduler/task_scheduler.cc » ('j') | base/task_scheduler/task_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698