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 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 4 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 } | 710 } |
711 | 711 |
712 void InstallCRX(Browser* browser, const FilePath& path) { | 712 void InstallCRX(Browser* browser, const FilePath& path) { |
713 ExtensionService* service = browser->profile()->GetExtensionService(); | 713 ExtensionService* service = browser->profile()->GetExtensionService(); |
714 CHECK(service); | 714 CHECK(service); |
715 | 715 |
716 scoped_refptr<extensions::CrxInstaller> installer( | 716 scoped_refptr<extensions::CrxInstaller> installer( |
717 extensions::CrxInstaller::Create( | 717 extensions::CrxInstaller::Create( |
718 service, | 718 service, |
719 chrome::CreateExtensionInstallPromptWithBrowser(browser))); | 719 chrome::CreateExtensionInstallPromptWithBrowser(browser))); |
| 720 installer->set_error_on_unsported_requirements(true); |
720 installer->set_is_gallery_install(false); | 721 installer->set_is_gallery_install(false); |
721 installer->set_allow_silent_install(false); | 722 installer->set_allow_silent_install(false); |
722 installer->InstallCrx(path); | 723 installer->InstallCrx(path); |
723 } | 724 } |
724 | 725 |
725 // If pdf plugin is enabled, we should open pdf files in a tab. | 726 // If pdf plugin is enabled, we should open pdf files in a tab. |
726 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { | 727 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { |
727 if (base::strcasecmp(file_extension, kPdfExtension) != 0) | 728 if (base::strcasecmp(file_extension, kPdfExtension) != 0) |
728 return false; | 729 return false; |
729 | 730 |
(...skipping 19 matching lines...) Expand all Loading... |
749 OperationRegistry::ProgressStatus>::const_iterator iter = | 750 OperationRegistry::ProgressStatus>::const_iterator iter = |
750 list.begin(); | 751 list.begin(); |
751 iter != list.end(); ++iter) { | 752 iter != list.end(); ++iter) { |
752 result_list->Append( | 753 result_list->Append( |
753 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 754 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
754 } | 755 } |
755 return result_list.release(); | 756 return result_list.release(); |
756 } | 757 } |
757 | 758 |
758 } // namespace file_manager_util | 759 } // namespace file_manager_util |
OLD | NEW |