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