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

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

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 unified diff | Download patch
« no previous file with comments | « extensions/browser/extension_dialog_auto_confirm.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/browser/extension_dialog_auto_confirm.h"
6
7 namespace extensions {
8
9 namespace {
10 ScopedTestDialogAutoConfirm::AutoConfirm g_extension_dialog_auto_confirm =
11 ScopedTestDialogAutoConfirm::NONE;
12 }
13
14 ScopedTestDialogAutoConfirm::ScopedTestDialogAutoConfirm(
15 ScopedTestDialogAutoConfirm::AutoConfirm override_value)
16 : old_value_(g_extension_dialog_auto_confirm) {
17 g_extension_dialog_auto_confirm = override_value;
18 }
19
20 ScopedTestDialogAutoConfirm::~ScopedTestDialogAutoConfirm() {
21 g_extension_dialog_auto_confirm = old_value_;
22 }
23
24 ScopedTestDialogAutoConfirm::AutoConfirm
25 ScopedTestDialogAutoConfirm::GetAutoConfirmValue() {
26 return g_extension_dialog_auto_confirm;
27 }
28
29 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_dialog_auto_confirm.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698