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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType", | 662 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType", |
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<extensions::CrxInstaller> installer( |
673 CrxInstaller::Create(service, new ExtensionInstallPrompt(browser))); | 673 extensions::CrxInstaller::Create( |
| 674 service, new ExtensionInstallPrompt(browser))); |
674 installer->set_is_gallery_install(false); | 675 installer->set_is_gallery_install(false); |
675 installer->set_allow_silent_install(false); | 676 installer->set_allow_silent_install(false); |
676 installer->InstallCrx(path); | 677 installer->InstallCrx(path); |
677 } | 678 } |
678 | 679 |
679 // If pdf plugin is enabled, we should open pdf files in a tab. | 680 // If pdf plugin is enabled, we should open pdf files in a tab. |
680 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { | 681 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { |
681 if (base::strcasecmp(file_extension, kPdfExtension) != 0) | 682 if (base::strcasecmp(file_extension, kPdfExtension) != 0) |
682 return false; | 683 return false; |
683 | 684 |
(...skipping 19 matching lines...) Expand all Loading... |
703 GDataOperationRegistry::ProgressStatus>::const_iterator iter = | 704 GDataOperationRegistry::ProgressStatus>::const_iterator iter = |
704 list.begin(); | 705 list.begin(); |
705 iter != list.end(); ++iter) { | 706 iter != list.end(); ++iter) { |
706 result_list->Append( | 707 result_list->Append( |
707 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 708 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
708 } | 709 } |
709 return result_list.release(); | 710 return result_list.release(); |
710 } | 711 } |
711 | 712 |
712 } // namespace file_manager_util | 713 } // namespace file_manager_util |
OLD | NEW |