Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / extensions / browser / extension_dialog_auto_confirm.h
blob5b4303e0e76c29d51e92d1523843dd1a6306ed3d
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 #ifndef EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
8 #include "base/auto_reset.h"
10 namespace extensions {
12 class ScopedTestDialogAutoConfirm {
13 public:
14 enum AutoConfirm {
15 NONE, // The prompt will show normally.
16 ACCEPT, // The prompt will always accept.
17 CANCEL, // The prompt will always cancel.
20 explicit ScopedTestDialogAutoConfirm(AutoConfirm override_value);
21 ~ScopedTestDialogAutoConfirm();
23 static AutoConfirm GetAutoConfirmValue();
25 private:
26 AutoConfirm old_value_;
28 DISALLOW_COPY_AND_ASSIGN(ScopedTestDialogAutoConfirm);
31 } // namespace extensions
33 #endif // EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_