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

Unified 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: Latest master 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_dialog_auto_confirm.h
diff --git a/extensions/browser/extension_dialog_auto_confirm.h b/extensions/browser/extension_dialog_auto_confirm.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b4303e0e76c29d51e92d1523843dd1a6306ed3d
--- /dev/null
+++ b/extensions/browser/extension_dialog_auto_confirm.h
@@ -0,0 +1,33 @@
+// Copyright 2015 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.
+
+#ifndef EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
+#define EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
+
+#include "base/auto_reset.h"
+
+namespace extensions {
+
+class ScopedTestDialogAutoConfirm {
+ public:
+ enum AutoConfirm {
+ NONE, // The prompt will show normally.
+ ACCEPT, // The prompt will always accept.
+ CANCEL, // The prompt will always cancel.
+ };
+
+ explicit ScopedTestDialogAutoConfirm(AutoConfirm override_value);
+ ~ScopedTestDialogAutoConfirm();
+
+ static AutoConfirm GetAutoConfirmValue();
+
+ private:
+ AutoConfirm old_value_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedTestDialogAutoConfirm);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
« no previous file with comments | « extensions/browser/api/runtime/runtime_apitest.cc ('k') | extensions/browser/extension_dialog_auto_confirm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698