Commit a1a134d4 authored by karandeepb's avatar karandeepb Committed by Commit Bot

Extensions: Remove unused Warning::CreateNetworkConflictWarning.

This CL removes the unused method Warning::CreateNetworkConflictWarning. It
seems to have been introduced in r167673 without any usages.

BUG=111700

Change-Id: I4f209bbcabafd0f19203f970dab8341c97a256eb
Reviewed-on: https://chromium-review.googlesource.com/1148170Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577669}
parent 98ebae32
...@@ -85,7 +85,7 @@ TEST(WarningBadgeServiceTest, SuppressBadgeForCurrentWarnings) { ...@@ -85,7 +85,7 @@ TEST(WarningBadgeServiceTest, SuppressBadgeForCurrentWarnings) {
EXPECT_FALSE(HasBadge(&profile)); EXPECT_FALSE(HasBadge(&profile));
// Set second warning and verify that it shows a badge. // Set second warning and verify that it shows a badge.
warnings.AddWarning(Warning::CreateNetworkConflictWarning(ext2_id)); warnings.AddWarning(Warning::CreateRepeatedCacheFlushesWarning(ext2_id));
EXPECT_TRUE(HasBadge(&profile)); EXPECT_TRUE(HasBadge(&profile));
warnings.RemoveObserver(&badge_service); warnings.RemoveObserver(&badge_service);
......
...@@ -38,7 +38,7 @@ using WarningServiceTest = ExtensionsTest; ...@@ -38,7 +38,7 @@ using WarningServiceTest = ExtensionsTest;
const char ext1_id[] = "extension1"; const char ext1_id[] = "extension1";
const char ext2_id[] = "extension2"; const char ext2_id[] = "extension2";
const Warning::WarningType warning_1 = Warning::kNetworkDelay; const Warning::WarningType warning_1 = Warning::kNetworkDelay;
const Warning::WarningType warning_2 = Warning::kNetworkConflict; const Warning::WarningType warning_2 = Warning::kRepeatedCacheFlushes;
} // namespace } // namespace
...@@ -80,7 +80,7 @@ TEST_F(WarningServiceTest, ClearWarnings) { ...@@ -80,7 +80,7 @@ TEST_F(WarningServiceTest, ClearWarnings) {
EXPECT_CALL(observer, ExtensionWarningsChanged(affected_extensions)); EXPECT_CALL(observer, ExtensionWarningsChanged(affected_extensions));
WarningSet warning_set; WarningSet warning_set;
warning_set.insert(Warning::CreateNetworkDelayWarning(ext1_id)); warning_set.insert(Warning::CreateNetworkDelayWarning(ext1_id));
warning_set.insert(Warning::CreateNetworkConflictWarning(ext2_id)); warning_set.insert(Warning::CreateRepeatedCacheFlushesWarning(ext2_id));
warning_service.AddWarnings(warning_set); warning_service.AddWarnings(warning_set);
testing::Mock::VerifyAndClearExpectations(&warning_service); testing::Mock::VerifyAndClearExpectations(&warning_service);
......
...@@ -77,16 +77,6 @@ Warning Warning::CreateNetworkDelayWarning( ...@@ -77,16 +77,6 @@ Warning Warning::CreateNetworkDelayWarning(
message_parameters); message_parameters);
} }
// static
Warning Warning::CreateNetworkConflictWarning(const std::string& extension_id) {
std::vector<std::string> message_parameters;
return Warning(
kNetworkConflict,
extension_id,
IDS_EXTENSION_WARNINGS_NETWORK_CONFLICT,
message_parameters);
}
// static // static
Warning Warning::CreateRedirectConflictWarning( Warning Warning::CreateRedirectConflictWarning(
const std::string& extension_id, const std::string& extension_id,
......
...@@ -57,8 +57,6 @@ class Warning { ...@@ -57,8 +57,6 @@ class Warning {
// Factory methods for various warning types. // Factory methods for various warning types.
static Warning CreateNetworkDelayWarning( static Warning CreateNetworkDelayWarning(
const std::string& extension_id); const std::string& extension_id);
static Warning CreateNetworkConflictWarning(
const std::string& extension_id);
static Warning CreateRedirectConflictWarning( static Warning CreateRedirectConflictWarning(
const std::string& extension_id, const std::string& extension_id,
const std::string& winning_extension_id, const std::string& winning_extension_id,
......
...@@ -332,9 +332,6 @@ ...@@ -332,9 +332,6 @@
<message name="IDS_EXTENSION_WARNINGS_NETWORK_DELAY" desc="Warning message indicating that an extension caused excessive network delays for web requests"> <message name="IDS_EXTENSION_WARNINGS_NETWORK_DELAY" desc="Warning message indicating that an extension caused excessive network delays for web requests">
This extension is slowing down <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>. You should disable it to restore <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>'s performance. This extension is slowing down <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>. You should disable it to restore <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>'s performance.
</message> </message>
<message name="IDS_EXTENSION_WARNINGS_NETWORK_CONFLICT" desc="Warning message which indicates that two or more extensions tried to modify a network request in a conflicting way and the modification of this extension was ignored">
This extension failed to modify a network request because the modification conflicted with another extension.
</message>
<message name="IDS_EXTENSION_WARNINGS_REDIRECT_CONFLICT" desc="Warning message indicating that two extensions tried to redirect to different destinations"> <message name="IDS_EXTENSION_WARNINGS_REDIRECT_CONFLICT" desc="Warning message indicating that two extensions tried to redirect to different destinations">
This extension failed to redirect a network request to <ph name="ATTEMPTED_REDIRECT_DESTINATION">$1<ex>http://www.google.com</ex></ph> because another extension (<ph name="EXTENSION_NAME">$2<ex>My Cool Extension</ex></ph>) redirected it to <ph name="ACTUAL_REDIRECT_DESTINATION">$3<ex>https://www.google.com</ex></ph>. This extension failed to redirect a network request to <ph name="ATTEMPTED_REDIRECT_DESTINATION">$1<ex>http://www.google.com</ex></ph> because another extension (<ph name="EXTENSION_NAME">$2<ex>My Cool Extension</ex></ph>) redirected it to <ph name="ACTUAL_REDIRECT_DESTINATION">$3<ex>https://www.google.com</ex></ph>.
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment