OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_ | |
6 #define EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_ | |
7 | |
8 #include "base/auto_reset.h" | |
9 | |
10 namespace extensions { | |
11 | |
12 // An enum used in for settings to cause dialogs to auto-confirm or cancel | |
13 // during testing. | |
14 enum ExtensionDialogAutoConfirm { | |
15 AUTO_CONFIRM_NONE, // The prompt will show normally. | |
16 AUTO_CONFIRM_ACCEPT, // The prompt will always accept. | |
17 AUTO_CONFIRM_CANCEL, // The prompt will always cancel. | |
18 }; | |
19 | |
20 using ScopedExtensionDialogAutoConfirm = | |
not at google - send to devlin
2015/05/30 01:13:28
it seems like the "Extension" (and above) at least
| |
21 base::AutoReset<ExtensionDialogAutoConfirm>; | |
22 | |
23 // Please use the above ScopedExtensionDialogAutoConfirm with these. | |
24 // It'd be nice if these could go in their corresponding classes, but the | |
25 // layering violation is enough of a pain that it's not worth it. | |
26 extern ExtensionDialogAutoConfirm g_auto_confirm_uninstall_for_testing; | |
27 extern ExtensionDialogAutoConfirm g_auto_confirm_install_for_testing; | |
not at google - send to devlin
2015/05/30 01:13:28
I don't find the callsites of these particularly a
| |
28 | |
29 } // namespace extensions | |
30 | |
31 #endif // EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_ | |
OLD | NEW |