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

Side by Side Diff: chrome/browser/automation/testing_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
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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 4644 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 new ExtensionReadyNotificationObserver( 4655 new ExtensionReadyNotificationObserver(
4656 manager, 4656 manager,
4657 service, 4657 service,
4658 this, 4658 this,
4659 reply_message); 4659 reply_message);
4660 service->EnableExtension(extension->id()); 4660 service->EnableExtension(extension->id());
4661 } else { 4661 } else {
4662 AutomationJSONReply(this, reply_message).SendSuccess(NULL); 4662 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
4663 } 4663 }
4664 } else { 4664 } else {
4665 service->DisableExtension(extension->id()); 4665 service->DisableExtension(extension->id(), Extension::DISABLE_USER_ACTION);
4666 AutomationJSONReply(this, reply_message).SendSuccess(NULL); 4666 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
4667 } 4667 }
4668 4668
4669 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito); 4669 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito);
4670 } 4670 }
4671 4671
4672 namespace { 4672 namespace {
4673 4673
4674 // Selects the given |browser| and |tab| if not selected already. 4674 // Selects the given |browser| and |tab| if not selected already.
4675 void EnsureTabSelected(Browser* browser, WebContents* tab) { 4675 void EnsureTabSelected(Browser* browser, WebContents* tab) {
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
7050 *browser_handle = browser_tracker_->Add(browser); 7050 *browser_handle = browser_tracker_->Add(browser);
7051 *success = true; 7051 *success = true;
7052 } 7052 }
7053 } 7053 }
7054 } 7054 }
7055 7055
7056 void TestingAutomationProvider::OnRemoveProvider() { 7056 void TestingAutomationProvider::OnRemoveProvider() {
7057 if (g_browser_process) 7057 if (g_browser_process)
7058 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7058 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7059 } 7059 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698