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
3 // found in the LICENSE file.
5 #include "extensions/browser/extension_dialog_auto_confirm.h"
10 ScopedTestDialogAutoConfirm::AutoConfirm g_extension_dialog_auto_confirm
=
11 ScopedTestDialogAutoConfirm::NONE
;
14 ScopedTestDialogAutoConfirm::ScopedTestDialogAutoConfirm(
15 ScopedTestDialogAutoConfirm::AutoConfirm override_value
)
16 : old_value_(g_extension_dialog_auto_confirm
) {
17 g_extension_dialog_auto_confirm
= override_value
;
20 ScopedTestDialogAutoConfirm::~ScopedTestDialogAutoConfirm() {
21 g_extension_dialog_auto_confirm
= old_value_
;
24 ScopedTestDialogAutoConfirm::AutoConfirm
25 ScopedTestDialogAutoConfirm::GetAutoConfirmValue() {
26 return g_extension_dialog_auto_confirm
;
29 } // namespace extensions