| Index: chrome/browser/sessions/session_service.cc
|
| ===================================================================
|
| --- chrome/browser/sessions/session_service.cc (revision 154486)
|
| +++ chrome/browser/sessions/session_service.cc (working copy)
|
| @@ -490,9 +490,7 @@
|
| return;
|
|
|
| ScheduleCommand(CreateSetTabUserAgentOverrideCommand(
|
| - kCommandSetTabUserAgentOverride,
|
| - tab_id.id(),
|
| - user_agent_override));
|
| + kCommandSetTabUserAgentOverride, tab_id.id(), user_agent_override));
|
| }
|
|
|
| SessionService::Handle SessionService::GetLastSession(
|
| @@ -510,9 +508,8 @@
|
| bool had_commands = !pending_commands().empty();
|
| BaseSessionService::Save();
|
| if (had_commands) {
|
| - RecordSessionUpdateHistogramData(
|
| - chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
|
| - &last_updated_save_time_);
|
| + RecordSessionUpdateHistogramData(chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
|
| + &last_updated_save_time_);
|
| content::NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
|
| content::Source<Profile>(profile()),
|
| @@ -610,8 +607,7 @@
|
| SetTabWindow(tab->session_tab_helper()->window_id(),
|
| tab->session_tab_helper()->session_id());
|
| if (tab->extension_tab_helper()->extension_app()) {
|
| - SetTabExtensionAppID(
|
| - tab->session_tab_helper()->window_id(),
|
| + SetTabExtensionAppID(tab->session_tab_helper()->window_id(),
|
| tab->session_tab_helper()->session_id(),
|
| tab->extension_tab_helper()->extension_app()->id());
|
| }
|
| @@ -657,18 +653,16 @@
|
| return;
|
| content::Details<content::PrunedDetails> pruned_details(details);
|
| if (pruned_details->from_front) {
|
| - TabNavigationPathPrunedFromFront(
|
| - tab->session_tab_helper()->window_id(),
|
| + TabNavigationPathPrunedFromFront(tab->session_tab_helper()->window_id(),
|
| tab->session_tab_helper()->session_id(),
|
| pruned_details->count);
|
| } else {
|
| - TabNavigationPathPrunedFromBack(
|
| - tab->session_tab_helper()->window_id(),
|
| + TabNavigationPathPrunedFromBack(tab->session_tab_helper()->window_id(),
|
| tab->session_tab_helper()->session_id(),
|
| tab->web_contents()->GetController().GetEntryCount());
|
| }
|
| - RecordSessionUpdateHistogramData(content::NOTIFICATION_NAV_LIST_PRUNED,
|
| - &last_updated_nav_list_pruned_time_);
|
| + RecordSessionUpdateHistogramData(type,
|
| + &last_updated_nav_list_pruned_time_);
|
| break;
|
| }
|
|
|
| @@ -679,10 +673,9 @@
|
| if (!tab || tab->profile() != profile())
|
| return;
|
| content::Details<content::EntryChangedDetails> changed(details);
|
| - UpdateTabNavigation(
|
| - tab->session_tab_helper()->window_id(),
|
| - tab->session_tab_helper()->session_id(),
|
| - changed->index, *changed->changed_entry);
|
| + UpdateTabNavigation(tab->session_tab_helper()->window_id(),
|
| + tab->session_tab_helper()->session_id(),
|
| + changed->index, *changed->changed_entry);
|
| break;
|
| }
|
|
|
| @@ -695,10 +688,8 @@
|
| int current_entry_index =
|
| tab->web_contents()->GetController().GetCurrentEntryIndex();
|
| SetSelectedNavigationIndex(tab->session_tab_helper()->window_id(),
|
| - tab->session_tab_helper()->session_id(),
|
| - current_entry_index);
|
| - UpdateTabNavigation(
|
| - tab->session_tab_helper()->window_id(),
|
| + tab->session_tab_helper()->session_id(), current_entry_index);
|
| + UpdateTabNavigation(tab->session_tab_helper()->window_id(),
|
| tab->session_tab_helper()->session_id(),
|
| current_entry_index,
|
| *tab->web_contents()->GetController().GetEntryAtIndex(
|
| @@ -706,9 +697,8 @@
|
| content::Details<content::LoadCommittedDetails> changed(details);
|
| if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE ||
|
| changed->type == content::NAVIGATION_TYPE_EXISTING_PAGE) {
|
| - RecordSessionUpdateHistogramData(
|
| - content::NOTIFICATION_NAV_ENTRY_COMMITTED,
|
| - &last_updated_nav_entry_commit_time_);
|
| + RecordSessionUpdateHistogramData(type,
|
| + &last_updated_nav_entry_commit_time_);
|
| }
|
| break;
|
| }
|
| @@ -721,8 +711,7 @@
|
| if (extension_tab_helper->extension_app()) {
|
| SessionTabHelper* helper =
|
| extension_tab_helper->tab_contents()->session_tab_helper();
|
| - SetTabExtensionAppID(helper->window_id(),
|
| - helper->session_id(),
|
| + SetTabExtensionAppID(helper->window_id(), helper->session_id(),
|
| extension_tab_helper->extension_app()->id());
|
| }
|
| break;
|
| @@ -740,10 +729,8 @@
|
| if (!ShouldTrackChangesToWindow(window_id))
|
| return;
|
|
|
| - ScheduleCommand(CreateSetTabExtensionAppIDCommand(
|
| - kCommandSetExtensionAppID,
|
| - tab_id.id(),
|
| - extension_app_id));
|
| + ScheduleCommand(CreateSetTabExtensionAppIDCommand(kCommandSetExtensionAppID,
|
| + tab_id.id(), extension_app_id));
|
| }
|
|
|
| SessionCommand* SessionService::CreateSetSelectedTabInWindow(
|
|
|