summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background
diff options
context:
space:
mode:
authorcsharp@chromium.org <csharp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-03 14:45:14 +0000
committercsharp@chromium.org <csharp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-03 14:45:14 +0000
commit99831013f958e62bad417a59151d43a97c8d7655 (patch)
tree34a9fa27dfc2d6e8de8e65b9656bc19957a65996 /chrome/browser/background
parent3f2ffd08fad01d7cd0aa62ebd4cf37bebe7feeb0 (diff)
downloadchromium_src-99831013f958e62bad417a59151d43a97c8d7655.zip
chromium_src-99831013f958e62bad417a59151d43a97c8d7655.tar.gz
chromium_src-99831013f958e62bad417a59151d43a97c8d7655.tar.bz2
Revert 281130 "Replace "external_install" boolean parameter with..."
This seems to cause HotwordServiceTest.UninstallReinstallTriggeredCorrectly to fail on Mac and Linux bots. > Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. > > The intent is to be able to address issues found in https://code.google.com/p/chromium/issues/detail?id=84556#c39 > > * This change should be a strict refactoring, and there should be no change of behavior wrt to extension uninstall behavior. > > * Identify a few specific reasons for extension uninstall and create enum values for them. > > * Run "git cl format" > > > BUG=84556 > TBR=sky@chromium.org for trivial changes under chrome/browser, except chrome/browser/extensions (already lgtm'ed). > > Review URL: https://codereview.chromium.org/284103002 TBR=rpaquay@chromium.org Review URL: https://codereview.chromium.org/365123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background')
-rw-r--r--chrome/browser/background/background_application_list_model_unittest.cc33
1 files changed, 11 insertions, 22 deletions
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc
index a8c8179..29ecc8c 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -211,28 +211,23 @@ TEST_F(BackgroundApplicationListModelTest, MAYBE_ExplicitTest) {
// Remove in FIFO order.
ASSERT_FALSE(IsBackgroundApp(*ext1.get()));
- service->UninstallExtension(
- ext1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(ext1->id(), false, NULL);
ASSERT_EQ(4U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp1.get()));
- service->UninstallExtension(
- bgapp1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(bgapp1->id(), false, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_FALSE(IsBackgroundApp(*ext2.get()));
- service->UninstallExtension(
- ext2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(ext2->id(), false, NULL);
ASSERT_EQ(2U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp2.get()));
- service->UninstallExtension(
- bgapp2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(bgapp2->id(), false, NULL);
ASSERT_EQ(1U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
ASSERT_FALSE(IsBackgroundApp(*ext3.get()));
- service->UninstallExtension(
- ext3->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(ext3->id(), false, NULL);
ASSERT_EQ(0U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
}
@@ -283,8 +278,7 @@ TEST_F(BackgroundApplicationListModelTest, PushMessagingTest) {
ASSERT_EQ(2U, model->size());
// Need to remove ext2 because it uses same id as bgapp3.
ASSERT_FALSE(IsBackgroundApp(*ext2.get()));
- service->UninstallExtension(
- ext2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(ext2->id(), false, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp3.get()));
@@ -294,23 +288,19 @@ TEST_F(BackgroundApplicationListModelTest, PushMessagingTest) {
// Remove in FIFO order.
ASSERT_FALSE(IsBackgroundApp(*ext1.get()));
- service->UninstallExtension(
- ext1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(ext1->id(), false, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(3U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp1.get()));
- service->UninstallExtension(
- bgapp1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(bgapp1->id(), false, NULL);
ASSERT_EQ(2U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp2.get()));
- service->UninstallExtension(
- bgapp2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(bgapp2->id(), false, NULL);
ASSERT_EQ(1U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp3.get()));
- service->UninstallExtension(
- bgapp3->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(bgapp3->id(), false, NULL);
ASSERT_EQ(0U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
}
@@ -427,8 +417,7 @@ void RemoveExtension(ExtensionService* service,
extensions->erase(cursor);
--*count;
ASSERT_EQ(*count, extensions->size());
- service->UninstallExtension(
- extension->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ service->UninstallExtension(extension->id(), false, NULL);
ASSERT_EQ(*count, service->extensions()->size());
ASSERT_EQ(*expected, model->size());
}