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

Side by Side Diff: cc/debug/micro_benchmark_controller.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/micro_benchmark.cc ('k') | cc/debug/micro_benchmark_controller.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 #ifndef CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ 5 #ifndef CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_
6 #define CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ 6 #define CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 class LayerTreeHostImpl; 23 class LayerTreeHostImpl;
24 class CC_EXPORT MicroBenchmarkController { 24 class CC_EXPORT MicroBenchmarkController {
25 public: 25 public:
26 explicit MicroBenchmarkController(LayerTreeHost* host); 26 explicit MicroBenchmarkController(LayerTreeHost* host);
27 ~MicroBenchmarkController(); 27 ~MicroBenchmarkController();
28 28
29 void DidUpdateLayers(); 29 void DidUpdateLayers();
30 30
31 // Returns the id of the benchmark on success, 0 otherwise. 31 // Returns the id of the benchmark on success, 0 otherwise.
32 int ScheduleRun(const std::string& micro_benchmark_name, 32 int ScheduleRun(const std::string& micro_benchmark_name,
33 scoped_ptr<base::Value> value, 33 std::unique_ptr<base::Value> value,
34 const MicroBenchmark::DoneCallback& callback); 34 const MicroBenchmark::DoneCallback& callback);
35 // Returns true if the message was successfully delivered and handled. 35 // Returns true if the message was successfully delivered and handled.
36 bool SendMessage(int id, scoped_ptr<base::Value> value); 36 bool SendMessage(int id, std::unique_ptr<base::Value> value);
37 37
38 void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl); 38 void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl);
39 39
40 private: 40 private:
41 void CleanUpFinishedBenchmarks(); 41 void CleanUpFinishedBenchmarks();
42 int GetNextIdAndIncrement(); 42 int GetNextIdAndIncrement();
43 43
44 LayerTreeHost* host_; 44 LayerTreeHost* host_;
45 std::vector<scoped_ptr<MicroBenchmark>> benchmarks_; 45 std::vector<std::unique_ptr<MicroBenchmark>> benchmarks_;
46 static int next_id_; 46 static int next_id_;
47 scoped_refptr<base::SingleThreadTaskRunner> main_controller_task_runner_; 47 scoped_refptr<base::SingleThreadTaskRunner> main_controller_task_runner_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController); 49 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController);
50 }; 50 };
51 51
52 } // namespace cc 52 } // namespace cc
53 53
54 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ 54 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/debug/micro_benchmark.cc ('k') | cc/debug/micro_benchmark_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698