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

Side by Side Diff: extensions/browser/extension_dialog_auto_confirm.h

Issue 1148323007: [Extensions] Introduce a ScopedExtensionDialogAutoConfirm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698