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

Side by Side Diff: base/trace_event/trace_config.cc

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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/trace_event/trace_config.h" 5 #include "base/trace_event/trace_config.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 std::string TraceConfig::ToString() const { 265 std::string TraceConfig::ToString() const {
266 std::unique_ptr<DictionaryValue> dict = ToDict(); 266 std::unique_ptr<DictionaryValue> dict = ToDict();
267 std::string json; 267 std::string json;
268 JSONWriter::Write(*dict, &json); 268 JSONWriter::Write(*dict, &json);
269 return json; 269 return json;
270 } 270 }
271 271
272 std::unique_ptr<ConvertableToTraceFormat> 272 std::unique_ptr<ConvertableToTraceFormat>
273 TraceConfig::AsConvertableToTraceFormat() const { 273 TraceConfig::AsConvertableToTraceFormat() const {
274 return WrapUnique(new ConvertableTraceConfigToTraceFormat(*this)); 274 return MakeUnique<ConvertableTraceConfigToTraceFormat>(*this);
275 } 275 }
276 276
277 std::string TraceConfig::ToCategoryFilterString() const { 277 std::string TraceConfig::ToCategoryFilterString() const {
278 std::string filter_string; 278 std::string filter_string;
279 WriteCategoryFilterString(included_categories_, &filter_string, true); 279 WriteCategoryFilterString(included_categories_, &filter_string, true);
280 WriteCategoryFilterString(disabled_categories_, &filter_string, true); 280 WriteCategoryFilterString(disabled_categories_, &filter_string, true);
281 WriteCategoryFilterString(excluded_categories_, &filter_string, false); 281 WriteCategoryFilterString(excluded_categories_, &filter_string, false);
282 WriteCategoryFilterString(synthetic_delays_, &filter_string); 282 WriteCategoryFilterString(synthetic_delays_, &filter_string);
283 return filter_string; 283 return filter_string;
284 } 284 }
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 StringPiece str) { 868 StringPiece str) {
869 return str.empty() || str.front() == ' ' || str.back() == ' '; 869 return str.empty() || str.front() == ' ' || str.back() == ' ';
870 } 870 }
871 871
872 bool TraceConfig::HasIncludedPatterns() const { 872 bool TraceConfig::HasIncludedPatterns() const {
873 return !included_categories_.empty(); 873 return !included_categories_.empty();
874 } 874 }
875 875
876 } // namespace trace_event 876 } // namespace trace_event
877 } // namespace base 877 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/process_memory_dump.cc ('k') | base/trace_event/trace_event_argument_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698