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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 } | 732 } |
733 | 733 |
734 void InstallCRX(Browser* browser, const FilePath& path) { | 734 void InstallCRX(Browser* browser, const FilePath& path) { |
735 ExtensionService* service = browser->profile()->GetExtensionService(); | 735 ExtensionService* service = browser->profile()->GetExtensionService(); |
736 CHECK(service); | 736 CHECK(service); |
737 | 737 |
738 scoped_refptr<extensions::CrxInstaller> installer( | 738 scoped_refptr<extensions::CrxInstaller> installer( |
739 extensions::CrxInstaller::Create( | 739 extensions::CrxInstaller::Create( |
740 service, | 740 service, |
741 chrome::CreateExtensionInstallPromptWithBrowser(browser))); | 741 chrome::CreateExtensionInstallPromptWithBrowser(browser))); |
| 742 installer->set_error_on_unsupported_requirements(true); |
742 installer->set_is_gallery_install(false); | 743 installer->set_is_gallery_install(false); |
743 installer->set_allow_silent_install(false); | 744 installer->set_allow_silent_install(false); |
744 installer->InstallCrx(path); | 745 installer->InstallCrx(path); |
745 } | 746 } |
746 | 747 |
747 // If pdf plugin is enabled, we should open pdf files in a tab. | 748 // If pdf plugin is enabled, we should open pdf files in a tab. |
748 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { | 749 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { |
749 if (base::strcasecmp(file_extension, kPdfExtension) != 0) | 750 if (base::strcasecmp(file_extension, kPdfExtension) != 0) |
750 return false; | 751 return false; |
751 | 752 |
(...skipping 19 matching lines...) Expand all Loading... |
771 OperationRegistry::ProgressStatus>::const_iterator iter = | 772 OperationRegistry::ProgressStatus>::const_iterator iter = |
772 list.begin(); | 773 list.begin(); |
773 iter != list.end(); ++iter) { | 774 iter != list.end(); ++iter) { |
774 result_list->Append( | 775 result_list->Append( |
775 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 776 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
776 } | 777 } |
777 return result_list.release(); | 778 return result_list.release(); |
778 } | 779 } |
779 | 780 |
780 } // namespace file_manager_util | 781 } // namespace file_manager_util |
OLD | NEW |