| 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3939 new ExtensionReadyNotificationObserver( | 3939 new ExtensionReadyNotificationObserver( |
| 3940 manager, | 3940 manager, |
| 3941 service, | 3941 service, |
| 3942 this, | 3942 this, |
| 3943 reply_message); | 3943 reply_message); |
| 3944 | 3944 |
| 3945 FilePath extension_path(path_string); | 3945 FilePath extension_path(path_string); |
| 3946 // If the given path has a 'crx' extension, assume it is a packed extension | 3946 // If the given path has a 'crx' extension, assume it is a packed extension |
| 3947 // and install it. Otherwise load it as an unpacked extension. | 3947 // and install it. Otherwise load it as an unpacked extension. |
| 3948 if (extension_path.MatchesExtension(FILE_PATH_LITERAL(".crx"))) { | 3948 if (extension_path.MatchesExtension(FILE_PATH_LITERAL(".crx"))) { |
| 3949 ExtensionInstallUI* client = | 3949 ExtensionInstallPrompt* client = |
| 3950 (with_ui ? new ExtensionInstallUI(browser->profile()) : NULL); | 3950 (with_ui ? new ExtensionInstallPrompt(browser->profile()) : NULL); |
| 3951 scoped_refptr<CrxInstaller> installer( | 3951 scoped_refptr<CrxInstaller> installer( |
| 3952 CrxInstaller::Create(service, client)); | 3952 CrxInstaller::Create(service, client)); |
| 3953 if (!with_ui) | 3953 if (!with_ui) |
| 3954 installer->set_allow_silent_install(true); | 3954 installer->set_allow_silent_install(true); |
| 3955 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); | 3955 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); |
| 3956 installer->InstallCrx(extension_path); | 3956 installer->InstallCrx(extension_path); |
| 3957 } else { | 3957 } else { |
| 3958 scoped_refptr<extensions::UnpackedInstaller> installer( | 3958 scoped_refptr<extensions::UnpackedInstaller> installer( |
| 3959 extensions::UnpackedInstaller::Create(service)); | 3959 extensions::UnpackedInstaller::Create(service)); |
| 3960 installer->set_prompt_for_plugins(with_ui); | 3960 installer->set_prompt_for_plugins(with_ui); |
| (...skipping 2609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6570 | 6570 |
| 6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( | 6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( |
| 6572 IPC::Message* reply_message) { | 6572 IPC::Message* reply_message) { |
| 6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); | 6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); |
| 6574 } | 6574 } |
| 6575 | 6575 |
| 6576 void TestingAutomationProvider::OnRemoveProvider() { | 6576 void TestingAutomationProvider::OnRemoveProvider() { |
| 6577 if (g_browser_process) | 6577 if (g_browser_process) |
| 6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6579 } | 6579 } |
| OLD | NEW |