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

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

Issue 9960087: Revert 13676 - Revert 131665 - Add a preference for why an extension is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | chrome/browser/automation/testing_automation_provider.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 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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } 907 }
908 } 908 }
909 909
910 void AutomationProvider::DisableExtension(int extension_handle, 910 void AutomationProvider::DisableExtension(int extension_handle,
911 bool* success) { 911 bool* success) {
912 *success = false; 912 *success = false;
913 const Extension* extension = GetEnabledExtension(extension_handle); 913 const Extension* extension = GetEnabledExtension(extension_handle);
914 ExtensionService* service = profile_->GetExtensionService(); 914 ExtensionService* service = profile_->GetExtensionService();
915 if (extension && service) { 915 if (extension && service) {
916 ExtensionUnloadNotificationObserver observer; 916 ExtensionUnloadNotificationObserver observer;
917 service->DisableExtension(extension->id()); 917 service->DisableExtension(extension->id(), Extension::DISABLE_USER_ACTION);
918 // The extension unload notification should have been sent synchronously 918 // The extension unload notification should have been sent synchronously
919 // with the disable. Just to be safe, check that it was received. 919 // with the disable. Just to be safe, check that it was received.
920 *success = observer.did_receive_unload_notification(); 920 *success = observer.did_receive_unload_notification();
921 } 921 }
922 } 922 }
923 923
924 void AutomationProvider::ExecuteExtensionActionInActiveTabAsync( 924 void AutomationProvider::ExecuteExtensionActionInActiveTabAsync(
925 int extension_handle, int browser_handle, 925 int extension_handle, int browser_handle,
926 IPC::Message* reply_message) { 926 IPC::Message* reply_message) {
927 bool success = false; 927 bool success = false;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 } 1015 }
1016 } 1016 }
1017 } 1017 }
1018 1018
1019 void AutomationProvider::SaveAsAsync(int tab_handle) { 1019 void AutomationProvider::SaveAsAsync(int tab_handle) {
1020 NavigationController* tab = NULL; 1020 NavigationController* tab = NULL;
1021 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 1021 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
1022 if (web_contents) 1022 if (web_contents)
1023 web_contents->OnSavePage(); 1023 web_contents->OnSavePage();
1024 } 1024 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698