| Index: components/infobars/test/test_confirm_infobar_delegate_factory.cc
|
| diff --git a/components/infobars/test/test_confirm_infobar_delegate_factory.cc b/components/infobars/test/test_confirm_infobar_delegate_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..47b7bf788652415271e46db2abafffd2c60a151c
|
| --- /dev/null
|
| +++ b/components/infobars/test/test_confirm_infobar_delegate_factory.cc
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2014 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 "components/infobars/test/test_confirm_infobar_delegate_factory.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "components/infobars/core/confirm_infobar_delegate.h"
|
| +#include "components/infobars/core/infobar.h"
|
| +
|
| +TestConfirmInfoBarDelegateFactory::TestConfirmInfoBarDelegateFactory() {
|
| + DCHECK(!ConfirmInfoBarDelegateFactory::GetInstance());
|
| + ConfirmInfoBarDelegateFactory::SetInstance(this);
|
| +}
|
| +
|
| +TestConfirmInfoBarDelegateFactory::~TestConfirmInfoBarDelegateFactory() {
|
| + DCHECK_EQ(ConfirmInfoBarDelegateFactory::GetInstance(), this);
|
| + ConfirmInfoBarDelegateFactory::SetInstance(nullptr);
|
| +}
|
| +
|
| +scoped_ptr<infobars::InfoBar> TestConfirmInfoBarDelegateFactory::CreateInfoBar(
|
| + scoped_ptr<ConfirmInfoBarDelegate> delegate) {
|
| + return make_scoped_ptr(new infobars::InfoBar(delegate.Pass()));
|
| +}
|
|
|