| 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/memory/scoped_ptr.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 void ShowExtensionInstallDialog(gfx::NativeWindow parent, | 62 void ShowExtensionInstallDialog(gfx::NativeWindow parent, |
| 63 content::PageNavigator* navigator, | 63 content::PageNavigator* navigator, |
| 64 ExtensionInstallPrompt::Delegate* delegate, | 64 ExtensionInstallPrompt::Delegate* delegate, |
| 65 const ExtensionInstallPrompt::Prompt& prompt) { | 65 const ExtensionInstallPrompt::Prompt& prompt) { |
| 66 AutoConfirmForTest auto_confirm = CheckAutoConfirmCommandLineSwitch(); | 66 AutoConfirmForTest auto_confirm = CheckAutoConfirmCommandLineSwitch(); |
| 67 if (auto_confirm != DO_NOT_SKIP) { | 67 if (auto_confirm != DO_NOT_SKIP) { |
| 68 DoAutoConfirm(auto_confirm, delegate); | 68 DoAutoConfirm(auto_confirm, delegate); |
| 69 return; | 69 return; |
| 70 } | 70 } |
| 71 if (!parent) { | |
| 72 delegate->InstallUIAbort(false); | |
| 73 return; | |
| 74 } | |
| 75 ShowExtensionInstallDialogImpl(parent, navigator, delegate, prompt); | 71 ShowExtensionInstallDialogImpl(parent, navigator, delegate, prompt); |
| 76 } | 72 } |
| OLD | NEW |