| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/extension_install_dialog.h" | 5 #include "chrome/browser/extensions/extension_install_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
| 15 #include "chrome/common/extensions/extension_manifest_constants.h" | 15 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | |
| 17 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 // A flag used for SetExtensionInstallDialogAutoConfirmForTests | 20 // A flag used for SetExtensionInstallDialogAutoConfirmForTests |
| 22 enum AutoConfirmForTest { | 21 enum AutoConfirmForTest { |
| 23 DO_NOT_SKIP = 0, | 22 DO_NOT_SKIP = 0, |
| 24 PROCEED, | 23 PROCEED, |
| 25 ABORT | 24 ABORT |
| 26 }; | 25 }; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void ShowExtensionInstallDialog(Profile* profile, | 62 void ShowExtensionInstallDialog(Profile* profile, |
| 64 ExtensionInstallUI::Delegate* delegate, | 63 ExtensionInstallUI::Delegate* delegate, |
| 65 const ExtensionInstallUI::Prompt& prompt) { | 64 const ExtensionInstallUI::Prompt& prompt) { |
| 66 AutoConfirmForTest auto_confirm = CheckAutoConfirmCommandLineSwitch(); | 65 AutoConfirmForTest auto_confirm = CheckAutoConfirmCommandLineSwitch(); |
| 67 if (auto_confirm != DO_NOT_SKIP) { | 66 if (auto_confirm != DO_NOT_SKIP) { |
| 68 DoAutoConfirm(auto_confirm, delegate); | 67 DoAutoConfirm(auto_confirm, delegate); |
| 69 return; | 68 return; |
| 70 } | 69 } |
| 71 ShowExtensionInstallDialogImpl(profile, delegate, prompt); | 70 ShowExtensionInstallDialogImpl(profile, delegate, prompt); |
| 72 } | 71 } |
| OLD | NEW |