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

Unified Diff: chrome/browser/automation/automation_tab_tracker.cc

Issue 10388175: Remove all the unnused automation IPCs. These were used by UI tests that have been converted to bro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
Index: chrome/browser/automation/automation_tab_tracker.cc
===================================================================
--- chrome/browser/automation/automation_tab_tracker.cc (revision 137438)
+++ chrome/browser/automation/automation_tab_tracker.cc (working copy)
@@ -24,10 +24,6 @@
content::Source<NavigationController>(resource));
registrar_.Add(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
content::Source<NavigationController>(resource));
- // We also want to know about navigations so we can keep track of the last
- // navigation time.
- registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(resource));
}
void AutomationTabTracker::RemoveObserver(NavigationController* resource) {
@@ -35,8 +31,6 @@
content::Source<NavigationController>(resource));
registrar_.Remove(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
content::Source<NavigationController>(resource));
- registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(resource));
}
void AutomationTabTracker::Observe(
@@ -44,20 +38,8 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case content::NOTIFICATION_LOAD_STOP:
- last_navigation_times_[
- content::Source<NavigationController>(source).ptr()] =
- base::Time::Now();
- return;
case chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED:
case chrome::NOTIFICATION_TAB_CLOSING:
- {
- std::map<NavigationController*, base::Time>::iterator iter =
- last_navigation_times_.find(
- content::Source<NavigationController>(source).ptr());
- if (iter != last_navigation_times_.end())
- last_navigation_times_.erase(iter);
- }
break;
default:
NOTREACHED();
@@ -65,16 +47,3 @@
AutomationResourceTracker<NavigationController*>::Observe(
type, source, details);
}
-
-base::Time AutomationTabTracker::GetLastNavigationTime(int handle) {
- if (ContainsHandle(handle)) {
- NavigationController* controller = GetResource(handle);
- if (controller) {
- std::map<NavigationController*, base::Time>::const_iterator iter
- = last_navigation_times_.find(controller);
- if (iter != last_navigation_times_.end())
- return iter->second;
- }
- }
- return base::Time();
-}
« no previous file with comments | « chrome/browser/automation/automation_tab_tracker.h ('k') | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698