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

Side by Side Diff: base/debug/trace_event_unittest.cc

Issue 12258039: enable -Wstring-conversion when compiling with clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enable on mac, better fix in web_data_service Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/debug/trace_event_unittest.h" 5 #include "base/debug/trace_event_unittest.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const char* value); 66 const char* value);
67 bool FindNonMatchingValue(const char* key, 67 bool FindNonMatchingValue(const char* key,
68 const char* value); 68 const char* value);
69 void Clear() { 69 void Clear() {
70 trace_parsed_.Clear(); 70 trace_parsed_.Clear();
71 json_output_.json_output.clear(); 71 json_output_.json_output.clear();
72 } 72 }
73 73
74 void BeginTrace() { 74 void BeginTrace() {
75 event_watch_notification_ = 0; 75 event_watch_notification_ = 0;
76 TraceLog::GetInstance()->SetEnabled("*"); 76 TraceLog::GetInstance()->SetEnabled(std::string("*"));
77 } 77 }
78 78
79 void EndTraceAndFlush() { 79 void EndTraceAndFlush() {
80 while (TraceLog::GetInstance()->IsEnabled()) 80 while (TraceLog::GetInstance()->IsEnabled())
81 TraceLog::GetInstance()->SetDisabled(); 81 TraceLog::GetInstance()->SetDisabled();
82 TraceLog::GetInstance()->Flush( 82 TraceLog::GetInstance()->Flush(
83 base::Bind(&TraceEventTestFixture::OnTraceDataCollected, 83 base::Bind(&TraceEventTestFixture::OnTraceDataCollected,
84 base::Unretained(this))); 84 base::Unretained(this)));
85 } 85 }
86 86
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 trace_log->SetEnabled(std::string("moo")); 1473 trace_log->SetEnabled(std::string("moo"));
1474 EXPECT_TRUE(*trace_log->GetCategoryEnabled("baz")); 1474 EXPECT_TRUE(*trace_log->GetCategoryEnabled("baz"));
1475 EXPECT_TRUE(*trace_log->GetCategoryEnabled("moo")); 1475 EXPECT_TRUE(*trace_log->GetCategoryEnabled("moo"));
1476 EXPECT_TRUE(*trace_log->GetCategoryEnabled("foo")); 1476 EXPECT_TRUE(*trace_log->GetCategoryEnabled("foo"));
1477 trace_log->SetDisabled(); 1477 trace_log->SetDisabled();
1478 trace_log->SetDisabled(); 1478 trace_log->SetDisabled();
1479 } 1479 }
1480 1480
1481 } // namespace debug 1481 } // namespace debug
1482 } // namespace base 1482 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698