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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_event_router.cc

Issue 2339393003: Remove some useless code in TabsEventRouter. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tabs/tabs_event_router.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
index 53ed84084150df99104d0e8bd1578787d42d4204..6cd663a13bbdc2bb2b18cc78ed03d899d9ecdc99 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
@@ -507,14 +507,9 @@ void TabsEventRouter::TabReplacedAt(TabStripModel* tab_strip_model,
}
void TabsEventRouter::TabPinnedStateChanged(WebContents* contents, int index) {
- TabStripModel* tab_strip = NULL;
- int tab_index;
-
- if (ExtensionTabUtil::GetTabStripModel(contents, &tab_strip, &tab_index)) {
- std::set<std::string> changed_property_names;
- changed_property_names.insert(tabs_constants::kPinnedKey);
- DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
- }
+ std::set<std::string> changed_property_names;
+ changed_property_names.insert(tabs_constants::kPinnedKey);
+ DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
}
void TabsEventRouter::OnZoomChanged(
@@ -558,26 +553,16 @@ void TabsEventRouter::OnFaviconUpdated(
void TabsEventRouter::OnDiscardedStateChange(WebContents* contents,
bool is_discarded) {
- TabStripModel* tab_strip = nullptr;
- int tab_index = -1;
-
- if (ExtensionTabUtil::GetTabStripModel(contents, &tab_strip, &tab_index)) {
- std::set<std::string> changed_property_names;
- changed_property_names.insert(tabs_constants::kDiscardedKey);
- DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
- }
+ std::set<std::string> changed_property_names;
+ changed_property_names.insert(tabs_constants::kDiscardedKey);
+ DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
}
void TabsEventRouter::OnAutoDiscardableStateChange(WebContents* contents,
bool is_auto_discardable) {
- TabStripModel* tab_strip = nullptr;
- int tab_index = -1;
-
- if (ExtensionTabUtil::GetTabStripModel(contents, &tab_strip, &tab_index)) {
- std::set<std::string> changed_property_names;
- changed_property_names.insert(tabs_constants::kAutoDiscardableKey);
- DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
- }
+ std::set<std::string> changed_property_names;
+ changed_property_names.insert(tabs_constants::kAutoDiscardableKey);
+ DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
}
} // namespace extensions
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698