| Index: components/sessions/core/tab_restore_service_helper.cc
|
| diff --git a/components/sessions/core/tab_restore_service_helper.cc b/components/sessions/core/tab_restore_service_helper.cc
|
| index cc3f2ae80af6260108bdefebf3fcb4a74d5119bc..1390ba1f6edade9ef1face23552d615bbefb4300 100644
|
| --- a/components/sessions/core/tab_restore_service_helper.cc
|
| +++ b/components/sessions/core/tab_restore_service_helper.cc
|
| @@ -129,7 +129,8 @@ std::vector<LiveTab*> TabRestoreServiceHelper::RestoreMostRecentEntry(
|
| LiveTabContext* context) {
|
| if (entries_.empty())
|
| return std::vector<LiveTab*>();
|
| - return RestoreEntryById(context, entries_.front()->id, UNKNOWN);
|
| + return RestoreEntryById(context, entries_.front()->id,
|
| + WindowOpenDisposition::UNKNOWN);
|
| }
|
|
|
| std::unique_ptr<TabRestoreService::Tab>
|
| @@ -242,8 +243,8 @@ std::vector<LiveTab*> TabRestoreServiceHelper::RestoreEntryById(
|
| }
|
| context->ShowBrowserWindow();
|
|
|
| - if (disposition == CURRENT_TAB && current_context &&
|
| - current_context->GetActiveLiveTab()) {
|
| + if (disposition == WindowOpenDisposition::CURRENT_TAB &&
|
| + current_context && current_context->GetActiveLiveTab()) {
|
| current_context->CloseTab();
|
| }
|
| break;
|
| @@ -373,13 +374,13 @@ LiveTabContext* TabRestoreServiceHelper::RestoreTab(
|
| WindowOpenDisposition disposition,
|
| LiveTab** live_tab) {
|
| LiveTab* restored_tab;
|
| - if (disposition == CURRENT_TAB && context) {
|
| + if (disposition == WindowOpenDisposition::CURRENT_TAB && context) {
|
| restored_tab = context->ReplaceRestoredTab(
|
| tab.navigations, tab.current_navigation_index, tab.from_last_session,
|
| tab.extension_app_id, tab.platform_data.get(), tab.user_agent_override);
|
| } else {
|
| // We only respsect the tab's original browser if there's no disposition.
|
| - if (disposition == UNKNOWN && tab.browser_id) {
|
| + if (disposition == WindowOpenDisposition::UNKNOWN && tab.browser_id) {
|
| context = client_->FindLiveTabContextWithID(tab.browser_id);
|
| }
|
|
|
| @@ -388,7 +389,7 @@ LiveTabContext* TabRestoreServiceHelper::RestoreTab(
|
| // |context| will be NULL in cases where one isn't already available (eg,
|
| // when invoked on Mac OS X with no windows open). In this case, create a
|
| // new browser into which we restore the tabs.
|
| - if (context && disposition != NEW_WINDOW) {
|
| + if (context && disposition != WindowOpenDisposition::NEW_WINDOW) {
|
| tab_index = tab.tabstrip_index;
|
| } else {
|
| context = client_->CreateLiveTabContext(std::string());
|
| @@ -399,13 +400,14 @@ LiveTabContext* TabRestoreServiceHelper::RestoreTab(
|
| // Place the tab at the end if the tab index is no longer valid or
|
| // we were passed a specific disposition.
|
| if (tab_index < 0 || tab_index > context->GetTabCount() ||
|
| - disposition != UNKNOWN) {
|
| + disposition != WindowOpenDisposition::UNKNOWN) {
|
| tab_index = context->GetTabCount();
|
| }
|
|
|
| restored_tab = context->AddRestoredTab(
|
| tab.navigations, tab_index, tab.current_navigation_index,
|
| - tab.extension_app_id, disposition != NEW_BACKGROUND_TAB, tab.pinned,
|
| + tab.extension_app_id,
|
| + disposition != WindowOpenDisposition::NEW_BACKGROUND_TAB, tab.pinned,
|
| tab.from_last_session, tab.platform_data.get(),
|
| tab.user_agent_override);
|
| restored_tab->LoadIfNecessary();
|
|
|