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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac test failure Created 10 years 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 | « no previous file | chrome/browser/download/download_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 4
5 #include "chrome/browser/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/message_box_flags.h" 9 #include "app/message_box_flags.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 IPC::Message* reply_message) { 792 IPC::Message* reply_message) {
793 ExtensionsService* service = profile_->GetExtensionsService(); 793 ExtensionsService* service = profile_->GetExtensionsService();
794 if (service) { 794 if (service) {
795 // The observer will delete itself when done. 795 // The observer will delete itself when done.
796 new ExtensionInstallNotificationObserver(this, 796 new ExtensionInstallNotificationObserver(this,
797 AutomationMsg_InstallExtension::ID, 797 AutomationMsg_InstallExtension::ID,
798 reply_message); 798 reply_message);
799 799
800 scoped_refptr<CrxInstaller> installer( 800 scoped_refptr<CrxInstaller> installer(
801 new CrxInstaller(service, NULL)); // silent install, no UI 801 new CrxInstaller(service, NULL)); // silent install, no UI
802 installer->set_allow_privilege_increase(true);
803 installer->InstallCrx(crx_path); 802 installer->InstallCrx(crx_path);
804 } else { 803 } else {
805 AutomationMsg_InstallExtension::WriteReplyParams( 804 AutomationMsg_InstallExtension::WriteReplyParams(
806 reply_message, AUTOMATION_MSG_EXTENSION_INSTALL_FAILED); 805 reply_message, AUTOMATION_MSG_EXTENSION_INSTALL_FAILED);
807 Send(reply_message); 806 Send(reply_message);
808 } 807 }
809 } 808 }
810 809
811 void AutomationProvider::LoadExpandedExtension( 810 void AutomationProvider::LoadExpandedExtension(
812 const FilePath& extension_dir, 811 const FilePath& extension_dir,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 // The observer will delete itself when done. 860 // The observer will delete itself when done.
862 new ExtensionReadyNotificationObserver( 861 new ExtensionReadyNotificationObserver(
863 manager, 862 manager,
864 this, 863 this,
865 AutomationMsg_InstallExtensionAndGetHandle::ID, 864 AutomationMsg_InstallExtensionAndGetHandle::ID,
866 reply_message); 865 reply_message);
867 866
868 ExtensionInstallUI* client = 867 ExtensionInstallUI* client =
869 (with_ui ? new ExtensionInstallUI(profile_) : NULL); 868 (with_ui ? new ExtensionInstallUI(profile_) : NULL);
870 scoped_refptr<CrxInstaller> installer(new CrxInstaller(service, client)); 869 scoped_refptr<CrxInstaller> installer(new CrxInstaller(service, client));
871 installer->set_allow_privilege_increase(true);
872 installer->InstallCrx(crx_path); 870 installer->InstallCrx(crx_path);
873 } else { 871 } else {
874 AutomationMsg_InstallExtensionAndGetHandle::WriteReplyParams( 872 AutomationMsg_InstallExtensionAndGetHandle::WriteReplyParams(
875 reply_message, 0); 873 reply_message, 0);
876 Send(reply_message); 874 Send(reply_message);
877 } 875 }
878 } 876 }
879 877
880 void AutomationProvider::UninstallExtension(int extension_handle, 878 void AutomationProvider::UninstallExtension(int extension_handle,
881 bool* success) { 879 bool* success) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } 1017 }
1020 } 1018 }
1021 } 1019 }
1022 1020
1023 void AutomationProvider::SaveAsAsync(int tab_handle) { 1021 void AutomationProvider::SaveAsAsync(int tab_handle) {
1024 NavigationController* tab = NULL; 1022 NavigationController* tab = NULL;
1025 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); 1023 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab);
1026 if (tab_contents) 1024 if (tab_contents)
1027 tab_contents->OnSavePage(); 1025 tab_contents->OnSavePage();
1028 } 1026 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698