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

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

Issue 10908184: Enforce the 'requirements' field in manifests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/download/download_crx_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 732 }
733 733
734 void InstallCRX(Browser* browser, const FilePath& path) { 734 void InstallCRX(Browser* browser, const FilePath& path) {
735 ExtensionService* service = browser->profile()->GetExtensionService(); 735 ExtensionService* service = browser->profile()->GetExtensionService();
736 CHECK(service); 736 CHECK(service);
737 737
738 scoped_refptr<extensions::CrxInstaller> installer( 738 scoped_refptr<extensions::CrxInstaller> installer(
739 extensions::CrxInstaller::Create( 739 extensions::CrxInstaller::Create(
740 service, 740 service,
741 chrome::CreateExtensionInstallPromptWithBrowser(browser))); 741 chrome::CreateExtensionInstallPromptWithBrowser(browser)));
742 installer->set_error_on_unsupported_requirements(true);
742 installer->set_is_gallery_install(false); 743 installer->set_is_gallery_install(false);
743 installer->set_allow_silent_install(false); 744 installer->set_allow_silent_install(false);
744 installer->InstallCrx(path); 745 installer->InstallCrx(path);
745 } 746 }
746 747
747 // If pdf plugin is enabled, we should open pdf files in a tab. 748 // If pdf plugin is enabled, we should open pdf files in a tab.
748 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) { 749 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) {
749 if (base::strcasecmp(file_extension, kPdfExtension) != 0) 750 if (base::strcasecmp(file_extension, kPdfExtension) != 0)
750 return false; 751 return false;
751 752
(...skipping 19 matching lines...) Expand all
771 OperationRegistry::ProgressStatus>::const_iterator iter = 772 OperationRegistry::ProgressStatus>::const_iterator iter =
772 list.begin(); 773 list.begin();
773 iter != list.end(); ++iter) { 774 iter != list.end(); ++iter) {
774 result_list->Append( 775 result_list->Append(
775 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 776 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
776 } 777 }
777 return result_list.release(); 778 return result_list.release();
778 } 779 }
779 780
780 } // namespace file_manager_util 781 } // namespace file_manager_util
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/download/download_crx_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698