Commit d06e9a05 authored by tzik's avatar tzik Committed by Commit Bot

Remove ambiguities affected by {WTF,base}::RefCounted unification

The upcoming unification of WTF::RefCounted and base::RefCounted causes
compile errors around AdoptRef, Bind, Passed due ADL.
This CL converts them to fully qualified names before it happens.

Bug: 763844
Change-Id: Ib2361e02e70de193f3b6d0401ff626426d0a162c
Reviewed-on: https://chromium-review.googlesource.com/684095
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504320}
parent e618e543
...@@ -71,7 +71,7 @@ TEST(SerializedScriptValueThreadedTest, ...@@ -71,7 +71,7 @@ TEST(SerializedScriptValueThreadedTest,
done->Signal(); done->Signal();
}, },
CrossThreadUnretained(&worker_thread), CrossThreadUnretained(&done), CrossThreadUnretained(&worker_thread), CrossThreadUnretained(&done),
Passed(RefPtr<SerializedScriptValue>(serialized)))); serialized));
done.Wait(); done.Wait();
// Now destroy the value on the main thread. // Now destroy the value on the main thread.
......
...@@ -12,7 +12,7 @@ namespace { ...@@ -12,7 +12,7 @@ namespace {
class LayoutThemeFuchsia : public LayoutThemeDefault { class LayoutThemeFuchsia : public LayoutThemeDefault {
public: public:
static RefPtr<LayoutTheme> Create() { static RefPtr<LayoutTheme> Create() {
return AdoptRef(new LayoutThemeFuchsia()); return WTF::AdoptRef(new LayoutThemeFuchsia());
} }
}; };
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace blink { namespace blink {
RefPtr<LayoutTheme> LayoutThemeWin::Create() { RefPtr<LayoutTheme> LayoutThemeWin::Create() {
return AdoptRef(new LayoutThemeWin()); return WTF::AdoptRef(new LayoutThemeWin());
} }
LayoutTheme& LayoutTheme::NativeTheme() { LayoutTheme& LayoutTheme::NativeTheme() {
......
...@@ -199,8 +199,8 @@ void OfflineAudioDestinationHandler::DoOfflineRendering() { ...@@ -199,8 +199,8 @@ void OfflineAudioDestinationHandler::DoOfflineRendering() {
// To ensure that the rendering step eventually happens, repost. // To ensure that the rendering step eventually happens, repost.
GetRenderingThread()->GetWebTaskRunner()->PostTask( GetRenderingThread()->GetWebTaskRunner()->PostTask(
BLINK_FROM_HERE, BLINK_FROM_HERE,
Bind(&OfflineAudioDestinationHandler::DoOfflineRendering, WTF::Bind(&OfflineAudioDestinationHandler::DoOfflineRendering,
WrapRefPtr(this))); WrapRefPtr(this)));
return; return;
} }
......
...@@ -466,7 +466,7 @@ TEST_F(BitmapImageTestWithMockDecoder, FrameSkipTracking) { ...@@ -466,7 +466,7 @@ TEST_F(BitmapImageTestWithMockDecoder, FrameSkipTracking) {
image_->SetData(SharedBuffer::Create("data", sizeof("data")), true); image_->SetData(SharedBuffer::Create("data", sizeof("data")), true);
RefPtr<scheduler::FakeWebTaskRunner> task_runner = RefPtr<scheduler::FakeWebTaskRunner> task_runner =
AdoptRef(new scheduler::FakeWebTaskRunner); WTF::AdoptRef(new scheduler::FakeWebTaskRunner);
image_->SetTaskRunnerForTesting(task_runner); image_->SetTaskRunnerForTesting(task_runner);
task_runner->SetTime(10); task_runner->SetTime(10);
......
...@@ -179,17 +179,17 @@ class NetworkStateNotifierTest : public ::testing::Test { ...@@ -179,17 +179,17 @@ class NetworkStateNotifierTest : public ::testing::Test {
void AddObserverOnNotification(StateObserver* observer, void AddObserverOnNotification(StateObserver* observer,
StateObserver* observer_to_add) { StateObserver* observer_to_add) {
observer->SetNotificationCallback( observer->SetNotificationCallback(
Bind(&NetworkStateNotifier::AddConnectionObserver, WTF::Bind(&NetworkStateNotifier::AddConnectionObserver,
WTF::Unretained(&notifier_), WTF::Unretained(observer_to_add), WTF::Unretained(&notifier_), WTF::Unretained(observer_to_add),
WTF::Unretained(GetTaskRunner()))); WTF::Unretained(GetTaskRunner())));
} }
void RemoveObserverOnNotification(StateObserver* observer, void RemoveObserverOnNotification(StateObserver* observer,
StateObserver* observer_to_remove) { StateObserver* observer_to_remove) {
observer->SetNotificationCallback( observer->SetNotificationCallback(WTF::Bind(
Bind(&NetworkStateNotifier::RemoveConnectionObserver, &NetworkStateNotifier::RemoveConnectionObserver,
WTF::Unretained(&notifier_), WTF::Unretained(observer_to_remove), WTF::Unretained(&notifier_), WTF::Unretained(observer_to_remove),
WTF::Unretained(GetTaskRunner()))); WTF::Unretained(GetTaskRunner())));
} }
bool VerifyObservations( bool VerifyObservations(
......
...@@ -340,18 +340,18 @@ TEST(FunctionalTest, RefCountedStorage) { ...@@ -340,18 +340,18 @@ TEST(FunctionalTest, RefCountedStorage) {
RefPtr<Number> five = Number::Create(5); RefPtr<Number> five = Number::Create(5);
EXPECT_EQ(1, five->RefCount()); EXPECT_EQ(1, five->RefCount());
Function<int()> multiply_five_by_two_function = Function<int()> multiply_five_by_two_function =
Bind(MultiplyNumberByTwo, five); WTF::Bind(MultiplyNumberByTwo, five);
EXPECT_EQ(2, five->RefCount()); EXPECT_EQ(2, five->RefCount());
EXPECT_EQ(10, multiply_five_by_two_function()); EXPECT_EQ(10, multiply_five_by_two_function());
EXPECT_EQ(2, five->RefCount()); EXPECT_EQ(2, five->RefCount());
Function<int()> multiply_four_by_two_function = Function<int()> multiply_four_by_two_function =
Bind(MultiplyNumberByTwo, Number::Create(4)); WTF::Bind(MultiplyNumberByTwo, Number::Create(4));
EXPECT_EQ(8, multiply_four_by_two_function()); EXPECT_EQ(8, multiply_four_by_two_function());
RefPtr<Number> six = Number::Create(6); RefPtr<Number> six = Number::Create(6);
Function<int()> multiply_six_by_two_function = Function<int()> multiply_six_by_two_function =
Bind(MultiplyNumberByTwo, std::move(six)); WTF::Bind(MultiplyNumberByTwo, std::move(six));
EXPECT_FALSE(six); EXPECT_FALSE(six);
EXPECT_EQ(12, multiply_six_by_two_function()); EXPECT_EQ(12, multiply_six_by_two_function());
} }
...@@ -360,7 +360,7 @@ TEST(FunctionalTest, UnretainedWithRefCounted) { ...@@ -360,7 +360,7 @@ TEST(FunctionalTest, UnretainedWithRefCounted) {
RefPtr<Number> five = Number::Create(5); RefPtr<Number> five = Number::Create(5);
EXPECT_EQ(1, five->RefCount()); EXPECT_EQ(1, five->RefCount());
Function<int()> multiply_five_by_two_function = Function<int()> multiply_five_by_two_function =
Bind(MultiplyNumberByTwo, WTF::Unretained(five.Get())); WTF::Bind(MultiplyNumberByTwo, WTF::Unretained(five.Get()));
EXPECT_EQ(1, five->RefCount()); EXPECT_EQ(1, five->RefCount());
EXPECT_EQ(10, multiply_five_by_two_function()); EXPECT_EQ(10, multiply_five_by_two_function());
EXPECT_EQ(1, five->RefCount()); EXPECT_EQ(1, five->RefCount());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment