| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 } | 677 } |
| 678 | 678 |
| 679 void InstallCRX(Browser* browser, const FilePath& path) { | 679 void InstallCRX(Browser* browser, const FilePath& path) { |
| 680 ExtensionService* service = browser->profile()->GetExtensionService(); | 680 ExtensionService* service = browser->profile()->GetExtensionService(); |
| 681 CHECK(service); | 681 CHECK(service); |
| 682 | 682 |
| 683 scoped_refptr<extensions::CrxInstaller> installer( | 683 scoped_refptr<extensions::CrxInstaller> installer( |
| 684 extensions::CrxInstaller::Create( | 684 extensions::CrxInstaller::Create( |
| 685 service, | 685 service, |
| 686 chrome::CreateExtensionInstallPromptWithBrowser(browser))); | 686 chrome::CreateExtensionInstallPromptWithBrowser(browser))); |
| 687 installer->set_error_on_unsported_requirements(true); |
| 687 installer->set_is_gallery_install(false); | 688 installer->set_is_gallery_install(false); |
| 688 installer->set_allow_silent_install(false); | 689 installer->set_allow_silent_install(false); |
| 689 installer->InstallCrx(path); | 690 installer->InstallCrx(path); |
| 690 } | 691 } |
| 691 | 692 |
| 692 // If pdf plugin is enabled, we should open pdf files in a tab. | 693 // If pdf plugin is enabled, we should open pdf files in a tab. |
| 693 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { | 694 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { |
| 694 if (base::strcasecmp(file_extension, kPdfExtension) != 0) | 695 if (base::strcasecmp(file_extension, kPdfExtension) != 0) |
| 695 return false; | 696 return false; |
| 696 | 697 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 716 GDataOperationRegistry::ProgressStatus>::const_iterator iter = | 717 GDataOperationRegistry::ProgressStatus>::const_iterator iter = |
| 717 list.begin(); | 718 list.begin(); |
| 718 iter != list.end(); ++iter) { | 719 iter != list.end(); ++iter) { |
| 719 result_list->Append( | 720 result_list->Append( |
| 720 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 721 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
| 721 } | 722 } |
| 722 return result_list.release(); | 723 return result_list.release(); |
| 723 } | 724 } |
| 724 | 725 |
| 725 } // namespace file_manager_util | 726 } // namespace file_manager_util |
| OLD | NEW |