OLD | NEW |
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 "chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h" | 5 #include "chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "components/autofill/core/browser/autofill_profile.h" | 10 #include "components/autofill/core/browser/autofill_profile.h" |
9 #include "components/autofill/core/browser/credit_card.h" | 11 #include "components/autofill/core/browser/credit_card.h" |
10 | 12 |
11 namespace autofill { | 13 namespace autofill { |
12 | 14 |
13 MockNewCreditCardBubbleController::MockNewCreditCardBubbleController() | 15 MockNewCreditCardBubbleController::MockNewCreditCardBubbleController() |
14 : bubbles_shown_(0) {} | 16 : bubbles_shown_(0) {} |
15 | 17 |
16 MockNewCreditCardBubbleController::~MockNewCreditCardBubbleController() {} | 18 MockNewCreditCardBubbleController::~MockNewCreditCardBubbleController() {} |
17 | 19 |
18 void MockNewCreditCardBubbleController::Show( | 20 void MockNewCreditCardBubbleController::Show( |
19 scoped_ptr<CreditCard> new_card, | 21 scoped_ptr<CreditCard> new_card, |
20 scoped_ptr<AutofillProfile> billing_profile) { | 22 scoped_ptr<AutofillProfile> billing_profile) { |
21 CHECK(new_card); | 23 CHECK(new_card); |
22 CHECK(billing_profile); | 24 CHECK(billing_profile); |
23 | 25 |
24 new_card_ = new_card.Pass(); | 26 new_card_ = std::move(new_card); |
25 billing_profile_ = billing_profile.Pass(); | 27 billing_profile_ = std::move(billing_profile); |
26 | 28 |
27 ++bubbles_shown_; | 29 ++bubbles_shown_; |
28 } | 30 } |
29 | 31 |
30 } // namespace autofill | 32 } // namespace autofill |
OLD | NEW |