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

Side by Side Diff: cc/debug/unittest_only_benchmark.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/input/top_controls_manager.cc » ('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 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 "cc/debug/unittest_only_benchmark.h" 5 #include "cc/debug/unittest_only_benchmark.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/debug/unittest_only_benchmark_impl.h" 10 #include "cc/debug/unittest_only_benchmark_impl.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) { 51 void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) {
52 NotifyDone(results.Pass()); 52 NotifyDone(results.Pass());
53 } 53 }
54 54
55 scoped_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl( 55 scoped_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
56 scoped_refptr<base::MessageLoopProxy> origin_loop) { 56 scoped_refptr<base::MessageLoopProxy> origin_loop) {
57 if (!create_impl_benchmark_) 57 if (!create_impl_benchmark_)
58 return make_scoped_ptr<MicroBenchmarkImpl>(NULL); 58 return make_scoped_ptr<MicroBenchmarkImpl>(NULL);
59 59
60 return scoped_ptr<MicroBenchmarkImpl>(new UnittestOnlyBenchmarkImpl( 60 return make_scoped_ptr(new UnittestOnlyBenchmarkImpl(
61 origin_loop, 61 origin_loop,
62 NULL, 62 NULL,
63 base::Bind(&UnittestOnlyBenchmark::RecordImplResults, 63 base::Bind(&UnittestOnlyBenchmark::RecordImplResults,
64 weak_ptr_factory_.GetWeakPtr()))); 64 weak_ptr_factory_.GetWeakPtr())));
65 } 65 }
66 66
67 } // namespace cc 67 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/input/top_controls_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698