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

Side by Side Diff: components/bubble/bubble_manager_mocks.cc

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 | « components/bubble/bubble_manager_mocks.h ('k') | components/bubble/bubble_manager_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/bubble/bubble_manager_mocks.h" 5 #include "components/bubble/bubble_manager_mocks.h"
6 6
7 #include "base/memory/ptr_util.h"
8
7 MockBubbleUi::MockBubbleUi() {} 9 MockBubbleUi::MockBubbleUi() {}
8 10
9 MockBubbleUi::~MockBubbleUi() { Destroyed(); } 11 MockBubbleUi::~MockBubbleUi() { Destroyed(); }
10 12
11 MockBubbleDelegate::MockBubbleDelegate() : bubble_ui_(new MockBubbleUi) {} 13 MockBubbleDelegate::MockBubbleDelegate() : bubble_ui_(new MockBubbleUi) {}
12 14
13 MockBubbleDelegate::~MockBubbleDelegate() { Destroyed(); } 15 MockBubbleDelegate::~MockBubbleDelegate() { Destroyed(); }
14 16
15 // static 17 // static
16 scoped_ptr<MockBubbleDelegate> MockBubbleDelegate::Default() { 18 std::unique_ptr<MockBubbleDelegate> MockBubbleDelegate::Default() {
17 MockBubbleDelegate* delegate = new MockBubbleDelegate; 19 MockBubbleDelegate* delegate = new MockBubbleDelegate;
18 EXPECT_CALL(*delegate, ShouldClose(testing::_)) 20 EXPECT_CALL(*delegate, ShouldClose(testing::_))
19 .Times(testing::AtMost(1)) 21 .Times(testing::AtMost(1))
20 .WillRepeatedly(testing::Return(true)); 22 .WillRepeatedly(testing::Return(true));
21 EXPECT_CALL(*delegate, DidClose(testing::_)); 23 EXPECT_CALL(*delegate, DidClose(testing::_));
22 EXPECT_CALL(*delegate, Destroyed()); 24 EXPECT_CALL(*delegate, Destroyed());
23 return make_scoped_ptr(delegate); 25 return base::WrapUnique(delegate);
24 } 26 }
25 27
26 // static 28 // static
27 scoped_ptr<MockBubbleDelegate> MockBubbleDelegate::Stubborn() { 29 std::unique_ptr<MockBubbleDelegate> MockBubbleDelegate::Stubborn() {
28 MockBubbleDelegate* delegate = new MockBubbleDelegate; 30 MockBubbleDelegate* delegate = new MockBubbleDelegate;
29 EXPECT_CALL(*delegate, ShouldClose(testing::_)) 31 EXPECT_CALL(*delegate, ShouldClose(testing::_))
30 .WillRepeatedly(testing::Return(false)); 32 .WillRepeatedly(testing::Return(false));
31 EXPECT_CALL(*delegate, DidClose(testing::_)); 33 EXPECT_CALL(*delegate, DidClose(testing::_));
32 EXPECT_CALL(*delegate, Destroyed()); 34 EXPECT_CALL(*delegate, Destroyed());
33 return make_scoped_ptr(delegate); 35 return base::WrapUnique(delegate);
34 } 36 }
OLDNEW
« no previous file with comments | « components/bubble/bubble_manager_mocks.h ('k') | components/bubble/bubble_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698