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

Unified Diff: cc/debug/unittest_only_benchmark.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/debug/unittest_only_benchmark.h ('k') | cc/debug/unittest_only_benchmark_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/unittest_only_benchmark.cc
diff --git a/cc/debug/unittest_only_benchmark.cc b/cc/debug/unittest_only_benchmark.cc
deleted file mode 100644
index 2bd5be99d98f21bd159bcd16480dd1a69a1ae86d..0000000000000000000000000000000000000000
--- a/cc/debug/unittest_only_benchmark.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/debug/unittest_only_benchmark.h"
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop_proxy.h"
-#include "base/values.h"
-#include "cc/debug/unittest_only_benchmark_impl.h"
-
-namespace cc {
-
-UnittestOnlyBenchmark::UnittestOnlyBenchmark(scoped_ptr<base::Value> value,
- const DoneCallback& callback)
- : MicroBenchmark(callback),
- create_impl_benchmark_(false),
- weak_ptr_factory_(this) {
- if (!value)
- return;
-
- base::DictionaryValue* settings = nullptr;
- value->GetAsDictionary(&settings);
- if (!settings)
- return;
-
- if (settings->HasKey("run_benchmark_impl"))
- settings->GetBoolean("run_benchmark_impl", &create_impl_benchmark_);
-}
-
-UnittestOnlyBenchmark::~UnittestOnlyBenchmark() {
- weak_ptr_factory_.InvalidateWeakPtrs();
-}
-
-void UnittestOnlyBenchmark::DidUpdateLayers(LayerTreeHost* host) {
- NotifyDone(nullptr);
-}
-
-bool UnittestOnlyBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
- base::DictionaryValue* message = nullptr;
- value->GetAsDictionary(&message);
- bool can_handle;
- if (message->HasKey("can_handle")) {
- message->GetBoolean("can_handle", &can_handle);
- if (can_handle)
- return true;
- }
- return false;
-}
-
-void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) {
- NotifyDone(results.Pass());
-}
-
-scoped_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
- scoped_refptr<base::MessageLoopProxy> origin_loop) {
- if (!create_impl_benchmark_)
- return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
-
- return make_scoped_ptr(new UnittestOnlyBenchmarkImpl(
- origin_loop,
- nullptr,
- base::Bind(&UnittestOnlyBenchmark::RecordImplResults,
- weak_ptr_factory_.GetWeakPtr())));
-}
-
-} // namespace cc
« no previous file with comments | « cc/debug/unittest_only_benchmark.h ('k') | cc/debug/unittest_only_benchmark_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698