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

Side by Side Diff: content/browser/tracing/tracing_controller_browsertest.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/public/browser/tracing_controller.h" 5 #include "content/public/browser/tracing_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const std::string& contents) override { 73 const std::string& contents) override {
74 EXPECT_EQ(trace_, contents); 74 EXPECT_EQ(trace_, contents);
75 75
76 std::string tmp = contents; 76 std::string tmp = contents;
77 scoped_refptr<base::RefCountedString> chunk_ptr = 77 scoped_refptr<base::RefCountedString> chunk_ptr =
78 base::RefCountedString::TakeString(&tmp); 78 base::RefCountedString::TakeString(&tmp);
79 79
80 BrowserThread::PostTask( 80 BrowserThread::PostTask(
81 BrowserThread::UI, FROM_HERE, 81 BrowserThread::UI, FROM_HERE,
82 base::Bind(done_callback_, base::Passed(std::move(metadata)), 82 base::Bind(done_callback_, base::Passed(std::move(metadata)),
83 chunk_ptr)); 83 base::RetainedRef(chunk_ptr)));
84 } 84 }
85 85
86 protected: 86 protected:
87 ~TracingControllerTestEndpoint() override {} 87 ~TracingControllerTestEndpoint() override {}
88 88
89 std::string trace_; 89 std::string trace_;
90 base::Callback<void(scoped_ptr<const base::DictionaryValue>, 90 base::Callback<void(scoped_ptr<const base::DictionaryValue>,
91 base::RefCountedString*)> done_callback_; 91 base::RefCountedString*)> done_callback_;
92 }; 92 };
93 93
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 TracingController* controller = TracingController::GetInstance(); 455 TracingController* controller = TracingController::GetInstance();
456 EXPECT_TRUE(controller->StartTracing( 456 EXPECT_TRUE(controller->StartTracing(
457 TraceConfig(), 457 TraceConfig(),
458 TracingController::StartTracingDoneCallback())); 458 TracingController::StartTracingDoneCallback()));
459 EXPECT_TRUE(controller->StopTracing(NULL)); 459 EXPECT_TRUE(controller->StopTracing(NULL));
460 base::RunLoop().RunUntilIdle(); 460 base::RunLoop().RunUntilIdle();
461 } 461 }
462 462
463 } // namespace content 463 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl_map.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698