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

Unified Diff: chrome/browser/extensions/page_action_controller.cc

Issue 482993003: Move logic to clear ExtensionAction values to ExtensionActionAPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 4 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 | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 8e39531404fb6229e7342e6f03043627271ccbde..3956072adabfc988485398f383d1746fd39c74ce 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -64,32 +64,8 @@ ExtensionAction::ShowAction PageActionController::OnClicked(
}
void PageActionController::OnNavigated() {
- const ExtensionSet& extensions =
- ExtensionRegistry::Get(web_contents_->GetBrowserContext())
- ->enabled_extensions();
- int tab_id = SessionTabHelper::IdForTab(web_contents_);
- size_t num_current_actions = 0u;
- for (ExtensionSet::const_iterator iter = extensions.begin();
- iter != extensions.end();
- ++iter) {
- ExtensionAction* action = GetActionForExtension(*iter);
- if (action) {
- action->ClearAllValuesForTab(tab_id);
- ++num_current_actions;
- }
- }
-
- Profile* profile = GetProfile();
- // Report the number of page actions for this profile, if we haven't already.
- // TODO(rdevlin.cronin): This is wrong. Instead, it should record the number
- // of page actions displayed per page.
- if (!g_reported_for_profiles.Get().count(profile)) {
- UMA_HISTOGRAM_COUNTS_100("PageActionController.ExtensionsWithPageActions",
- num_current_actions);
- g_reported_for_profiles.Get().insert(profile);
- }
-
- LocationBarController::NotifyChange(web_contents_);
+ // Clearing extension action values is handled in TabHelper, so nothing to
+ // do here.
}
void PageActionController::OnExtensionActionUpdated(
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698