Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager_util.cc

Issue 10683003: Moved CrxInstaller and CrxInstallerError into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest-er master Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType", 673 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType",
674 extension_index, 674 extension_index,
675 arraysize(kUMATrackingExtensions) - 1); 675 arraysize(kUMATrackingExtensions) - 1);
676 return false; 676 return false;
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<CrxInstaller> installer( 683 scoped_refptr<extensions::CrxInstaller> installer(
684 CrxInstaller::Create( 684 extensions::CrxInstaller::Create(
685 service, 685 service,
686 chrome::CreateExtensionInstallPromptWithBrowser(browser))); 686 chrome::CreateExtensionInstallPromptWithBrowser(browser)));
687 installer->set_is_gallery_install(false); 687 installer->set_is_gallery_install(false);
688 installer->set_allow_silent_install(false); 688 installer->set_allow_silent_install(false);
689 installer->InstallCrx(path); 689 installer->InstallCrx(path);
690 } 690 }
691 691
692 // If pdf plugin is enabled, we should open pdf files in a tab. 692 // If pdf plugin is enabled, we should open pdf files in a tab.
693 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { 693 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) {
694 if (base::strcasecmp(file_extension, kPdfExtension) != 0) 694 if (base::strcasecmp(file_extension, kPdfExtension) != 0)
(...skipping 21 matching lines...) Expand all
716 GDataOperationRegistry::ProgressStatus>::const_iterator iter = 716 GDataOperationRegistry::ProgressStatus>::const_iterator iter =
717 list.begin(); 717 list.begin();
718 iter != list.end(); ++iter) { 718 iter != list.end(); ++iter) {
719 result_list->Append( 719 result_list->Append(
720 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 720 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
721 } 721 }
722 return result_list.release(); 722 return result_list.release();
723 } 723 }
724 724
725 } // namespace file_manager_util 725 } // namespace file_manager_util
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698