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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issue exposed by failing unit test. Created 6 years, 5 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
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/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { 544 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) {
545 ExtensionService* service = extensions::ExtensionSystem::Get( 545 ExtensionService* service = extensions::ExtensionSystem::Get(
546 profile())->extension_service(); 546 profile())->extension_service();
547 service->UnloadExtension(extension_id, 547 service->UnloadExtension(extension_id,
548 extensions::UnloadedExtensionInfo::REASON_DISABLE); 548 extensions::UnloadedExtensionInfo::REASON_DISABLE);
549 } 549 }
550 550
551 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { 551 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) {
552 ExtensionService* service = extensions::ExtensionSystem::Get( 552 ExtensionService* service = extensions::ExtensionSystem::Get(
553 profile())->extension_service(); 553 profile())->extension_service();
554 service->UninstallExtension(extension_id, false, NULL); 554 service->UninstallExtension(
555 extension_id, ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
555 } 556 }
556 557
557 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { 558 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) {
558 ExtensionService* service = extensions::ExtensionSystem::Get( 559 ExtensionService* service = extensions::ExtensionSystem::Get(
559 profile())->extension_service(); 560 profile())->extension_service();
560 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION); 561 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION);
561 } 562 }
562 563
563 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { 564 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) {
564 ExtensionService* service = extensions::ExtensionSystem::Get( 565 ExtensionService* service = extensions::ExtensionSystem::Get(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( 642 return extensions::browsertest_util::ExecuteScriptInBackgroundPage(
642 profile(), extension_id, script); 643 profile(), extension_id, script);
643 } 644 }
644 645
645 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( 646 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait(
646 const std::string& extension_id, 647 const std::string& extension_id,
647 const std::string& script) { 648 const std::string& script) {
648 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( 649 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait(
649 profile(), extension_id, script); 650 profile(), extension_id, script);
650 } 651 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/management/management_api.cc ('k') | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698