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

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

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: recheck on enable Created 8 years, 3 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 710 }
711 711
712 void InstallCRX(Browser* browser, const FilePath& path) { 712 void InstallCRX(Browser* browser, const FilePath& path) {
713 ExtensionService* service = browser->profile()->GetExtensionService(); 713 ExtensionService* service = browser->profile()->GetExtensionService();
714 CHECK(service); 714 CHECK(service);
715 715
716 scoped_refptr<extensions::CrxInstaller> installer( 716 scoped_refptr<extensions::CrxInstaller> installer(
717 extensions::CrxInstaller::Create( 717 extensions::CrxInstaller::Create(
718 service, 718 service,
719 chrome::CreateExtensionInstallPromptWithBrowser(browser))); 719 chrome::CreateExtensionInstallPromptWithBrowser(browser)));
720 installer->set_error_on_unsported_requirements(true);
720 installer->set_is_gallery_install(false); 721 installer->set_is_gallery_install(false);
721 installer->set_allow_silent_install(false); 722 installer->set_allow_silent_install(false);
722 installer->InstallCrx(path); 723 installer->InstallCrx(path);
723 } 724 }
724 725
725 // If pdf plugin is enabled, we should open pdf files in a tab. 726 // If pdf plugin is enabled, we should open pdf files in a tab.
726 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { 727 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) {
727 if (base::strcasecmp(file_extension, kPdfExtension) != 0) 728 if (base::strcasecmp(file_extension, kPdfExtension) != 0)
728 return false; 729 return false;
729 730
(...skipping 19 matching lines...) Expand all
749 OperationRegistry::ProgressStatus>::const_iterator iter = 750 OperationRegistry::ProgressStatus>::const_iterator iter =
750 list.begin(); 751 list.begin();
751 iter != list.end(); ++iter) { 752 iter != list.end(); ++iter) {
752 result_list->Append( 753 result_list->Append(
753 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 754 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
754 } 755 }
755 return result_list.release(); 756 return result_list.release();
756 } 757 }
757 758
758 } // namespace file_manager_util 759 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698