| 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_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 BrowserThread::FILE, FROM_HERE, | 576 BrowserThread::FILE, FROM_HERE, |
| 577 base::Bind( | 577 base::Bind( |
| 578 &extension_file_util::DeleteFile, extension_path, false))) | 578 &extension_file_util::DeleteFile, extension_path, false))) |
| 579 NOTREACHED(); | 579 NOTREACHED(); |
| 580 | 580 |
| 581 return false; | 581 return false; |
| 582 } | 582 } |
| 583 | 583 |
| 584 // We want a silent install only for non-pending extensions and | 584 // We want a silent install only for non-pending extensions and |
| 585 // pending extensions that have install_silently set. | 585 // pending extensions that have install_silently set. |
| 586 ExtensionInstallUI* client = | 586 ExtensionInstallPrompt* client = |
| 587 (!is_pending_extension || pending_extension_info.install_silently()) ? | 587 (!is_pending_extension || pending_extension_info.install_silently()) ? |
| 588 NULL : new ExtensionInstallUI(profile_); | 588 NULL : new ExtensionInstallPrompt(profile_); |
| 589 | 589 |
| 590 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client)); | 590 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client)); |
| 591 installer->set_expected_id(id); | 591 installer->set_expected_id(id); |
| 592 if (is_pending_extension) | 592 if (is_pending_extension) |
| 593 installer->set_install_source(pending_extension_info.install_source()); | 593 installer->set_install_source(pending_extension_info.install_source()); |
| 594 else if (extension) | 594 else if (extension) |
| 595 installer->set_install_source(extension->location()); | 595 installer->set_install_source(extension->location()); |
| 596 if (pending_extension_info.install_silently()) | 596 if (pending_extension_info.install_silently()) |
| 597 installer->set_allow_silent_install(true); | 597 installer->set_allow_silent_install(true); |
| 598 // If the extension was installed from or has migrated to the webstore, or | 598 // If the extension was installed from or has migrated to the webstore, or |
| (...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2557 // To coexist with certain unit tests that don't have an IO thread message | 2557 // To coexist with certain unit tests that don't have an IO thread message |
| 2558 // loop available at ExtensionService shutdown, we lazy-initialize this | 2558 // loop available at ExtensionService shutdown, we lazy-initialize this |
| 2559 // object so that those cases neither create nor destroy an | 2559 // object so that those cases neither create nor destroy an |
| 2560 // APIResourceController. | 2560 // APIResourceController. |
| 2561 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2561 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2562 if (!api_resource_controller_) { | 2562 if (!api_resource_controller_) { |
| 2563 api_resource_controller_ = new extensions::APIResourceController(); | 2563 api_resource_controller_ = new extensions::APIResourceController(); |
| 2564 } | 2564 } |
| 2565 return api_resource_controller_; | 2565 return api_resource_controller_; |
| 2566 } | 2566 } |
| OLD | NEW |