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

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

Issue 10014005: 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 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
4702 new ExtensionReadyNotificationObserver( 4702 new ExtensionReadyNotificationObserver(
4703 manager, 4703 manager,
4704 service, 4704 service,
4705 this, 4705 this,
4706 reply_message); 4706 reply_message);
4707 service->EnableExtension(extension->id()); 4707 service->EnableExtension(extension->id());
4708 } else { 4708 } else {
4709 AutomationJSONReply(this, reply_message).SendSuccess(NULL); 4709 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
4710 } 4710 }
4711 } else { 4711 } else {
4712 service->DisableExtension(extension->id()); 4712 service->DisableExtension(extension->id(), Extension::DISABLE_USER_ACTION);
4713 AutomationJSONReply(this, reply_message).SendSuccess(NULL); 4713 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
4714 } 4714 }
4715 4715
4716 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito); 4716 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito);
4717 } 4717 }
4718 4718
4719 namespace { 4719 namespace {
4720 4720
4721 // Selects the given |browser| and |tab| if not selected already. 4721 // Selects the given |browser| and |tab| if not selected already.
4722 void EnsureTabSelected(Browser* browser, WebContents* tab) { 4722 void EnsureTabSelected(Browser* browser, WebContents* tab) {
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
7099 *browser_handle = browser_tracker_->Add(browser); 7099 *browser_handle = browser_tracker_->Add(browser);
7100 *success = true; 7100 *success = true;
7101 } 7101 }
7102 } 7102 }
7103 } 7103 }
7104 7104
7105 void TestingAutomationProvider::OnRemoveProvider() { 7105 void TestingAutomationProvider::OnRemoveProvider() {
7106 if (g_browser_process) 7106 if (g_browser_process)
7107 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7107 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7108 } 7108 }
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