| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 extension_index, | 663 extension_index, |
| 664 arraysize(kUMATrackingExtensions) - 1); | 664 arraysize(kUMATrackingExtensions) - 1); |
| 665 return false; | 665 return false; |
| 666 } | 666 } |
| 667 | 667 |
| 668 void InstallCRX(Browser* browser, const FilePath& path) { | 668 void InstallCRX(Browser* browser, const FilePath& path) { |
| 669 ExtensionService* service = browser->profile()->GetExtensionService(); | 669 ExtensionService* service = browser->profile()->GetExtensionService(); |
| 670 CHECK(service); | 670 CHECK(service); |
| 671 | 671 |
| 672 scoped_refptr<CrxInstaller> installer( | 672 scoped_refptr<CrxInstaller> installer( |
| 673 CrxInstaller::Create(service, new ExtensionInstallPrompt(browser))); | 673 CrxInstaller::Create( |
| 674 service, |
| 675 chrome::CreateExtensionInstallPromptWithBrowser(browser))); |
| 674 installer->set_is_gallery_install(false); | 676 installer->set_is_gallery_install(false); |
| 675 installer->set_allow_silent_install(false); | 677 installer->set_allow_silent_install(false); |
| 676 installer->InstallCrx(path); | 678 installer->InstallCrx(path); |
| 677 } | 679 } |
| 678 | 680 |
| 679 // If pdf plugin is enabled, we should open pdf files in a tab. | 681 // If pdf plugin is enabled, we should open pdf files in a tab. |
| 680 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { | 682 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { |
| 681 if (base::strcasecmp(file_extension, kPdfExtension) != 0) | 683 if (base::strcasecmp(file_extension, kPdfExtension) != 0) |
| 682 return false; | 684 return false; |
| 683 | 685 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 703 GDataOperationRegistry::ProgressStatus>::const_iterator iter = | 705 GDataOperationRegistry::ProgressStatus>::const_iterator iter = |
| 704 list.begin(); | 706 list.begin(); |
| 705 iter != list.end(); ++iter) { | 707 iter != list.end(); ++iter) { |
| 706 result_list->Append( | 708 result_list->Append( |
| 707 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 709 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
| 708 } | 710 } |
| 709 return result_list.release(); | 711 return result_list.release(); |
| 710 } | 712 } |
| 711 | 713 |
| 712 } // namespace file_manager_util | 714 } // namespace file_manager_util |
| OLD | NEW |