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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 BrowserThread::FILE, FROM_HERE, | 568 BrowserThread::FILE, FROM_HERE, |
569 base::Bind( | 569 base::Bind( |
570 &extension_file_util::DeleteFile, extension_path, false))) | 570 &extension_file_util::DeleteFile, extension_path, false))) |
571 NOTREACHED(); | 571 NOTREACHED(); |
572 | 572 |
573 return false; | 573 return false; |
574 } | 574 } |
575 | 575 |
576 // We want a silent install only for non-pending extensions and | 576 // We want a silent install only for non-pending extensions and |
577 // pending extensions that have install_silently set. | 577 // pending extensions that have install_silently set. |
578 ExtensionInstallUI* client = | 578 ExtensionInstallPrompt* client = |
579 (!is_pending_extension || pending_extension_info.install_silently()) ? | 579 (!is_pending_extension || pending_extension_info.install_silently()) ? |
580 NULL : new ExtensionInstallUI(profile_); | 580 NULL : new ExtensionInstallPrompt(profile_); |
581 | 581 |
582 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client)); | 582 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client)); |
583 installer->set_expected_id(id); | 583 installer->set_expected_id(id); |
584 if (is_pending_extension) | 584 if (is_pending_extension) |
585 installer->set_install_source(pending_extension_info.install_source()); | 585 installer->set_install_source(pending_extension_info.install_source()); |
586 else if (extension) | 586 else if (extension) |
587 installer->set_install_source(extension->location()); | 587 installer->set_install_source(extension->location()); |
588 if (pending_extension_info.install_silently()) | 588 if (pending_extension_info.install_silently()) |
589 installer->set_allow_silent_install(true); | 589 installer->set_allow_silent_install(true); |
590 // If the extension was installed from or has migrated to the webstore, or | 590 // If the extension was installed from or has migrated to the webstore, or |
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 | 2547 |
2548 // To coexist with certain unit tests that don't have a work-thread message | 2548 // To coexist with certain unit tests that don't have a work-thread message |
2549 // loop available at ExtensionService shutdown, we lazy-initialize this | 2549 // loop available at ExtensionService shutdown, we lazy-initialize this |
2550 // object so that those cases neither create nor destroy an | 2550 // object so that those cases neither create nor destroy an |
2551 // APIResourceController. | 2551 // APIResourceController. |
2552 if (!api_resource_controller_.get()) { | 2552 if (!api_resource_controller_.get()) { |
2553 api_resource_controller_.reset(new extensions::APIResourceController()); | 2553 api_resource_controller_.reset(new extensions::APIResourceController()); |
2554 } | 2554 } |
2555 return api_resource_controller_.get(); | 2555 return api_resource_controller_.get(); |
2556 } | 2556 } |
OLD | NEW |