summaryrefslogtreecommitdiffstats
path: root/base/test/trace_event_analyzer_unittest.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 00:10:04 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 00:10:04 +0000
commite24f876c537646cab5a9e8492658f570ccd7da4a (patch)
tree85aa283d18c10b47f1e3acbafce3283661407477 /base/test/trace_event_analyzer_unittest.cc
parentb538d7ea0b2484074dea680d60f7f68750d1d1e3 (diff)
downloadchromium_src-e24f876c537646cab5a9e8492658f570ccd7da4a.zip
chromium_src-e24f876c537646cab5a9e8492658f570ccd7da4a.tar.gz
chromium_src-e24f876c537646cab5a9e8492658f570ccd7da4a.tar.bz2
Retry 114494 - Remove BindStateHolder and have Bind() return a Callback<> object directly."
This removes some complexity and also fixes a bug where if you call Bind() with the result of Bind(), the resulting Callback would only be valid during the first call. Ouch. Also makes the static type checking a bit more strict when assigning into a Callback<>. BUG=none TEST=new unittests Review URL: http://codereview.chromium.org/8915024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test/trace_event_analyzer_unittest.cc')
-rw-r--r--base/test/trace_event_analyzer_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index 602f139..18cf4cb 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -15,7 +15,8 @@ class TraceEventAnalyzerTest : public testing::Test {
public:
void ManualSetUp();
void OnTraceDataCollected(
- scoped_refptr<base::debug::TraceLog::RefCountedString> json_events_str);
+ const scoped_refptr<base::debug::TraceLog::RefCountedString>&
+ json_events_str);
void BeginTracing();
void EndTracing();
@@ -35,7 +36,8 @@ void TraceEventAnalyzerTest::ManualSetUp() {
}
void TraceEventAnalyzerTest::OnTraceDataCollected(
- scoped_refptr<base::debug::TraceLog::RefCountedString> json_events_str) {
+ const scoped_refptr<base::debug::TraceLog::RefCountedString>&
+ json_events_str) {
buffer_.AddFragment(json_events_str->data);
}
@@ -758,4 +760,3 @@ TEST_F(TraceEventAnalyzerTest, CountMatches) {
} // namespace trace_analyzer
-